Update README.md
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user