Collect and Display Windows System Information

SOTI MobiControl
Windows

As an IT administrator, gathering detailed system information from Windows devices is often essential for troubleshooting, software compatibility checks, or overall device management. Manually collecting this data from multiple devices can be time-consuming and impractical. The Collect Windows System Information script allows you to remotely retrieve comprehensive system details from all Windows endpoints in your fleet. Whether it’s hardware specifications, software configurations, or performance metrics, this script streamlines the process, ensuring you have the necessary data to make informed decisions without the need for manual intervention on each device.

Important:
  • It is recommended to test the script on a local/ test machine for its purpose and effects. 
  • SOTI MobiControl will not be responsible for any damage/loss to the data/setup based on the behavior of the script.

Collect and display Windows system information

1 # Display processor information
2 Write-Host "`nProcessor Information:`n" -ForegroundColor Cyan
3 Get-CimInstance -ClassName Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors | Format-Table -AutoSize
4 # Display BIOS information
5 Write-Host "`nBIOS Information:`n" -ForegroundColor Cyan
6 Get-CimInstance -ClassName Win32_BIOS | Select-Object Manufacturer, Name, Version, SerialNumber | Format-Table -AutoSize
7 # Display computer manufacturer and model
8 Write-Host "`nComputer Manufacturer and Model:`n" -ForegroundColor Cyan
9 Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Manufacturer, Model | Format-Table -AutoSize
10 # List operating system version information
11 Write-Host "`nOperating System Version Information:`n" -ForegroundColor Cyan
12 Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Caption, Version, BuildNumber, OSArchitecture | Format-Table -AutoSize
13 # List local users
14 Write-Host "`nLocal Users:`n" -ForegroundColor Cyan
15 Get-LocalUser | Select-Object Name, Enabled | Format-Table -AutoSize
16 # List installed hotfixes
17 Write-Host "`nInstalled Hotfixes:`n" -ForegroundColor Cyan
18 Get-HotFix | Select-Object HotFixID, Description, InstalledOn | Format-Table -AutoSize
19 # Display available disk space
20 Write-Host "`nAvailable Disk Space:`n" -ForegroundColor Cyan
21 Get-CimInstance -ClassName Win32_LogicalDisk | Where-Object { $_.DriveType -eq 3 } |
22 Select-Object DeviceID, @{Name="Total Size (GB)";Expression={"{0:N2}" -f ($_.Size / 1GB)}},
23 @{Name="Free Space (GB)";Expression={"{0:N2}" -f ($_.FreeSpace / 1GB)}} | Format-Table -AutoSize
24 # Display the user logged on to a computer
25 Write-Host "`nUser Logged On:`n" -ForegroundColor Cyan
26 $LoggedOnUser = (Get-CimInstance -ClassName Win32_ComputerSystem).UserName
27 if ($LoggedOnUser) {
28 Write-Host "Current User: $LoggedOnUser"
29 } else {
30 Write-Host "No user is logged in."
31 }
32 # Display the local time from a computer
33 Write-Host "`nLocal Time:`n" -ForegroundColor Cyan
34 Get-Date
35 # Display all system and OS properties
36 Write-Host "`nAll System and OS Properties:`n" -ForegroundColor Cyan
37 Get-CimInstance -ClassName Win32_OperatingSystem | Format-List *
38 # Display BIOS properties
39 Write-Host "`nBIOS Properties:`n" -ForegroundColor Cyan
40 Get-CimInstance -ClassName Win32_BIOS | Format-List *
41 # Display version properties
42 Write-Host "`nVersion Properties:`n" -ForegroundColor Cyan
43 (Get-CimInstance -ClassName Win32_OperatingSystem).Version
44 # Display specific OS details
45 Write-Host "`nSpecific OS Details:`n" -ForegroundColor Cyan
46 Get-CimInstance -ClassName Win32_OperatingSystem |
47 Select-Object Caption, Version, BuildNumber, ServicePackMajorVersion, ServicePackMinorVersion, OSArchitecture | Format-List

Was this helpful?

Need more help?
Ask Community