From 28754441df14131bd0c1c9d4fe1eef493757b33c Mon Sep 17 00:00:00 2001 From: minster586 <43217359+minster586@users.noreply.github.com> Date: Tue, 14 Oct 2025 23:40:55 -0400 Subject: [PATCH] Fixed to show instructions set --- .../Get-SystemSecurityAndHardwareInfo.ps1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 b/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 index a21b38c..28193fd 100644 --- a/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 +++ b/System Info (ps1)/Get-SystemSecurityAndHardwareInfo.ps1 @@ -115,7 +115,12 @@ function Get-MainDriveInfo { } # Build output +$runtimeInfo = [ordered]@{} +$runtimeInfo.PSVersion = $PSVersionTable.PSVersion.ToString() +try { $runtimeInfo.Framework = [System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription } catch { $runtimeInfo.Framework = [string]([Environment]::Version) } + $result = [ordered]@{} +$result.Runtime = $runtimeInfo $result.TPM = Get-TPMStatus $result.SecureBoot = Get-SecureBootStatus $result.RAM = Get-RAMInfo @@ -139,7 +144,13 @@ function Format-ResultText($res) { $lines += "CPU: $($res.CPU.Name)" $lines += "CPU Manufacturer: $($res.CPU.Manufacturer)" $lines += "CPU Cores: $($res.CPU.Cores) Logical Processors: $($res.CPU.LogicalProcessors) MaxClockMHz: $($res.CPU.MaxClockMHz)" - if ($res.CPU.InstructionSets.Count -gt 0) { $lines += "CPU Instruction Sets: $($res.CPU.InstructionSets -join ', ')" } + if ($res.CPU.InstructionSets.Count -gt 0) { + $lines += "CPU Instruction Sets: $($res.CPU.InstructionSets -join ', ')" + } else { + $lines += "CPU Instruction Sets: Not available on this runtime. Try running under PowerShell 7+ (pwsh) for full detection." + } + $lines += "" + $lines += "Runtime: PowerShell $($res.Runtime.PSVersion) $($res.Runtime.Framework)" $lines += "" if ($res.MainDrive) { $lines += "Main Drive ($($res.MainDrive.DeviceID)) Size: $($res.MainDrive.SizeGB) GB ($([string]::Format('{0:N0}', $res.MainDrive.SizeBytes)) bytes) Free: $([math]::Round($res.MainDrive.FreeBytes/1GB,2)) GB"