Get System Information

Retrieves comprehensive system information including OS version, hardware specs, and uptime.

beginnerSystem Administrationsysteminfohardwarediagnostics
get-system-information.ps1
1$computerInfo = Get-ComputerInfo
2$os = Get-CimInstance Win32_OperatingSystem
3
4[PSCustomObject]@{
5 ComputerName = $env:COMPUTERNAME
6 OS = $os.Caption
7 Version = $os.Version
8 Architecture = $os.OSArchitecture
9 LastBoot = $os.LastBootUpTime
10 Uptime = (Get-Date) - $os.LastBootUpTime
11 TotalRAM = [math]::Round($computerInfo.CsTotalPhysicalMemory / 1GB, 2)
12 Processor = $computerInfo.CsProcessors.Name
13}
Quick Actions
Use Cases
  • Use this script to quickly gather system specifications for inventory or troubleshooting purposes.
Details
CategorySystem Administration
Complexitybeginner
Added3/13/2026
Get System Information - PowerShell Hub