Query Hardware With Get-CimInstance

Read WMI/CIM classes for CPU, disk, BIOS and more as objects.

Windowshardwaresystemsystem-infoLow risk
Run Get-CimInstance Win32_Processor | Select-Object Name, NumberOfCores to read CPU data.

01Command

Command
$ Get-CimInstance Win32_Processor | Select-Object Name, NumberOfCores, MaxClockSpeed

02What it does

CIM cmdlets expose the same WMI data that management tools use, but return objects that filter cleanly and work against remote computers. Inventory scripts built on this are portable across machines and easy to export.

03Risk

RiskLow risk
RequirementsWindows 10/11 with PowerShell 5.1 or PowerShell 7+
!Warning: Some classes require elevated rights or are not populated on virtual machines; handle missing properties gracefully.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-CimInstance
    Microsoft Learn · vendor-doc · 2026-09-20
    Evidence: Retrieves CIM instances such as WMI hardware classes.

Last verified: 2026-10-13 · Category: System & Settings

06Related solutions