Showing posts with label Architecture. Show all posts
Showing posts with label Architecture. Show all posts

Tuesday, August 14, 2018

Powershell script to determine OS architecture (32bit or 64bit)

This will return either "32" or "64" depending on the OS architecture.

Write-Host (Get-WmiObject -Class Win32_Processor | Select-Object AddressWidth).AddressWidth
NOTE: this is OS architecture, not CPU architecture. That is not relevant on 64bit machines, but if you have 32bit Windows running on a 64bit CPU it will return 32.