PowerShell: Check CPU Architecture
Need to check whether a processor is 32-bit or 64-bit - for compatibility checks or confirming hardware specs? This one-liner pulls it straight from the system, though the raw output isn't as readable as you'd expect.
Prerequisites:
- Privileges: None
- Module: Built-in, no import needed
Quick Command:
Get-CimInstance -ClassName Win32_Processor | Select-Object Architecture
Example Output:
Architecture
------------
9
📦
Want all of them at once?
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.
How It Works:
- Get-CimInstance -ClassName Win32_Processor queries the processor class, which reports details about each physical CPU installed in the system.
- Architecture returns a numeric code, not a readable string - a legacy design from when this CIM class needed to support architectures like MIPS, Alpha, and PowerPC alongside x86/x64.
- The most common values are: 0 = x86 (32-bit), 6 = Itanium, 9 = x64 (64-bit), 12 = ARM64.
- This is different from checking whether Windows itself is 32-bit or 64-bit (OSArchitecture on Win32_OperatingSystem) - this property reports the physical CPU's architecture, which can differ from what the installed OS actually uses.