From 092ac3631a67517ffa2842b48097d2e45639a278 Mon Sep 17 00:00:00 2001 From: minster586 <43217359+minster586@users.noreply.github.com> Date: Wed, 15 Oct 2025 02:03:14 -0400 Subject: [PATCH] sync with minster586 --- .../Get-SystemSecurityAndHardwareInfo.ps1 | 9 +++++++++ System Info (ps1)/README.md | 7 +++++-- System Info (ps1)/my_report.txt | 15 --------------- 3 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 System Info (ps1)/my_report.txt diff --git a/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 b/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 index 28193fd..129a098 100644 --- a/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 +++ b/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 @@ -8,6 +8,15 @@ param( [string]$OutputFile ) +# Note about host: If this script is run under Windows PowerShell (5.1) some advanced detection +# (CPU intrinsics via System.Runtime.Intrinsics) will be unavailable. If you want a single +# copy-paste one-liner that automatically runs the script under pwsh (PowerShell 7+) use the +# following pattern (recommended when piping from the web): +# +# iwr -UseBasicParsing "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1" | & pwsh -Command - +# +# This will fetch the script and execute it under pwsh so instruction-set detection works. + function Get-TPMStatus { # Try CIM first (Windows 10/11) try { diff --git a/System Info (ps1)/README.md b/System Info (ps1)/README.md index 2d22bea..e5273d0 100644 --- a/System Info (ps1)/README.md +++ b/System Info (ps1)/README.md @@ -62,13 +62,16 @@ pwsh.exe -File .\Get-SystemSecurityAndHardwareInfo.ps1 -OutputFile report.txt - Download and run directly from a raw GitHub URL (only if you trust the URL): ```powershell - iwr -UseBasicParsing "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1" | iex +# Fetch and execute under pwsh (PowerShell 7+) so full CPU detection works: +iwr -UseBasicParsing "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1" | & pwsh -Command - ``` Security note: `iwr | iex` downloads and immediately executes code from the given URL. Only run such commands for sources you fully trust. A safer approach is to download the file, inspect it, then execute it locally: ```powershell - iwr -OutFile .\Get-SystemSecurityAndHardwareInfo.ps1 "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1" +# Safer: download, inspect, then run under pwsh +iwr -OutFile .\Get-SystemSecurityAndHardwareInfo.ps1 "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1" # Inspect the file, then run: pwsh.exe -File .\Get-SystemSecurityAndHardwareInfo.ps1 -OutputFile my_report.txt ``` +version 1.0.0 \ No newline at end of file diff --git a/System Info (ps1)/my_report.txt b/System Info (ps1)/my_report.txt deleted file mode 100644 index 3437e3a..0000000 --- a/System Info (ps1)/my_report.txt +++ /dev/null @@ -1,15 +0,0 @@ -System Hardware & Security Report - 2025-10-14 23:24:30Z - -TPM Installed: True -TPM Enabled/Activated: True - -Secure Boot Enabled: False - -Installed RAM: 31.83 GB (34,176,880,640 bytes) - -CPU: Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz -CPU Manufacturer: GenuineIntel -CPU Cores: 6 Logical Processors: 12 MaxClockMHz: 4104 -CPU Instruction Sets: SSE, SSE2, SSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, BMI1, BMI2 - -Main Drive (C:) Size: 476.03 GB (511,128,338,432 bytes) Free: 87.17 GB