From a0616024eabbec0677da11684cd147e6e852b8c1 Mon Sep 17 00:00:00 2001 From: minster586 <43217359+minster586@users.noreply.github.com> Date: Wed, 15 Oct 2025 02:12:43 -0400 Subject: [PATCH] Update README.md --- System Info (ps1)/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/System Info (ps1)/README.md b/System Info (ps1)/README.md index e5273d0..aa22b65 100644 --- a/System Info (ps1)/README.md +++ b/System Info (ps1)/README.md @@ -60,9 +60,13 @@ pwsh.exe -File .\Get-SystemSecurityAndHardwareInfo.ps1 -OutputFile report.txt ``` - Download and run directly from a raw GitHub URL (only if you trust the URL): +- Execute directly (preferred when you trust the source): ```powershell -# Fetch and execute under pwsh (PowerShell 7+) so full CPU detection works: +# Option A (safest single-line): fetch only the script text and pipe into pwsh for execution. +(iwr -UseBasicParsing "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1").Content | & pwsh -Command - + +# Option B (forces pwsh, similar to above but uses the response pipeline): iwr -UseBasicParsing "https://git.smartcraft.me/Smartcraft-Media-Tech/System-Info/raw/branch/master/System%20Info%20%28ps1%29/Get-SystemSecurityAndHardwareInfo.ps1" | & pwsh -Command - ``` @@ -74,4 +78,16 @@ iwr -OutFile .\Get-SystemSecurityAndHardwareInfo.ps1 "https://git.smartcraft.me/ # Inspect the file, then run: pwsh.exe -File .\Get-SystemSecurityAndHardwareInfo.ps1 -OutputFile my_report.txt ``` + +### Quick check: verify pwsh is available + +Run this to check whether `pwsh` is installed and print the pwsh/.NET versions (recommended before using the piped examples): + +```powershell +if (Get-Command pwsh -ErrorAction SilentlyContinue) { + pwsh -NoProfile -Command '$PSVersionTable.PSVersion; [System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription' +} else { + Write-Host 'pwsh (PowerShell 7+) not found on this system.' +} +``` version 1.0.0 \ No newline at end of file