This PowerShell script automates the process of gathering system information, including OS details, hardware specifications, and running services. By providing a comprehensive overview, this script is invaluable for system audits, troubleshooting, and inventory management.
powershell
$osInfo = Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Name, Version, BuildNumber, OSArchitecture, LastBootUpTime
$osInfo
$cpuInfo = Get-CimInstance -ClassName Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors, MaxClockSpeed
$memoryInfo = Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum
$totalMemoryGB = [math]::round($memoryInfo.Sum / 1GB, 2)
$cpuInfo
$totalMemoryGB
$installedSoftware = Get-CimInstance -ClassName Win32_Product | Select-Object Name, Version, Vendor
$installedSoftware
$runningServices = Get-Service | Where-Object { $_.Status -eq 'Running' } | Select-Object DisplayName, ServiceName, Status
$runningServices
Write-Host "System Information Summary Report"
Write-Host "-------------------------------------"
Write-Host "Operating System: $($osInfo.Name), Version: $($osInfo.Version), Build: $($osInfo.BuildNumber), Architecture: $($osInfo.OSArchitecture)"
Write-Host "Last Boot Time: $($osInfo.LastBootUpTime)"
Write-Host "CPU Info: $($cpuInfo.Name), Cores: $($cpuInfo.NumberOfCores), Logical Processors: $($cpuInfo.NumberOfLogicalProcessors), Max Clock Speed: $($cpuInfo.MaxClockSpeed) MHz"
Write-Host "Total Physical Memory: $totalMemoryGB GB"
Write-Host "-------------------------------------"
Write-Host "Running Services:"
$runningServices | Format-Table -AutoSize
Write-Host "-------------------------------------"
Write-Host "Installed Software:"
$installedSoftware | Format-Table -AutoSizeRun it across your fleet
This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.
More in System Administration
Generate a Random Password with PowerShell
2026-08-17Get the Public IP Address with PowerShell
2026-08-17Send a Wake-on-LAN Magic Packet with PowerShell
2026-08-17Force a Windows Shutdown with PowerShell
2026-08-17Download and Extract Files with BITS in PowerShell
2026-08-17Check Linux Uptime and Disk Usage over SSH
2026-08-17Ready when you are.
Try ServerEngine free for 7 days.