Created
March 22, 2026 16:07
-
-
Save stephenfeather/101303d26275754fbea2e87ee99a138a to your computer and use it in GitHub Desktop.
Powershell Script to Grab quick system information
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get-SystemInfo.ps1 | |
| # Outputs key system hardware information | |
| $cpu = Get-CimInstance -ClassName Win32_Processor | Select-Object -First 1 | |
| $os = Get-CimInstance -ClassName Win32_OperatingSystem | |
| $gpus = Get-CimInstance -ClassName Win32_VideoController | |
| $info = [ordered]@{ | |
| "Windows Version" = "$($os.Caption) ($($os.Version))" | |
| "Processor Brand" = $cpu.Name.Trim() | |
| "Processor Architecture" = switch ($cpu.Architecture) { | |
| 0 { "x86" } | |
| 5 { "ARM" } | |
| 9 { "x64" } | |
| 12 { "ARM64" } | |
| default { "Unknown ($($cpu.Architecture))" } | |
| } | |
| "Processor Family" = $cpu.Description | |
| "Processor Speed" = "$($cpu.MaxClockSpeed) MHz" | |
| "System RAM (Total)" = "{0:N2} GB" -f ($os.TotalVisibleMemorySize / 1MB) | |
| } | |
| $info.GetEnumerator() | ForEach-Object { | |
| "{0,-25} : {1}" -f $_.Key, $_.Value | |
| } | |
| $index = 1 | |
| foreach ($gpu in $gpus) { | |
| $label = if ($gpus.Count -gt 1) { " [$index]" } else { "" } | |
| "{0,-25} : {1}" -f "GPU$label", $gpu.Name | |
| "{0,-25} : {1}" -f "GPU Memory (Total)$label", ("{0:N2} GB" -f ($gpu.AdapterRAM / 1GB)) | |
| $index++ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment