Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Using the Powershell console, what command/commands can be executed to determine if the 32 or 64 bit bersion of Windows Server 2008 is installed?

share|improve this question
Very similar to this question:… – Kevin Kuphal Jun 17 '09 at 18:52
I see now you asked both :) The environment variable option given in your other question should be trivial to get from PowerShell. – Kevin Kuphal Jun 17 '09 at 18:53
Yes... I wanted a PowerShell solution as well and I decided it was better to break my 2 part question into 2 questions since everyone were only answering the first part. – Matt Spradley Jun 17 '09 at 21:18

6 Answers 6

up vote 13 down vote accepted

Or try this:

PS C:\Users\jeffh> $os=Get-WMIObject win32_operatingsystem
PS C:\Users\jeffh> $os.OSArchitecture

Found at:

share|improve this answer
One-liner: (gwmi win32_operatingsystem).osarchitecture – John Homer Oct 9 at 19:56


share|improve this answer
I believe the question was about the version of Windows, not the processor architecture. – Lost Hobbit Jan 8 '13 at 9:16

So be it:

share|improve this answer
Technically, that's .NET reflection...not native powershell. I'll show myself out... – John Homer Oct 9 at 19:59
excellent @JohnHomer ! – romu Oct 15 at 8:37

"echo %PROCESSOR_ARCHITECTURE%" down-voted? Must not be powershelly enough, which is funny if you look at the other examples using WMI and other aliases.

oh well, try this:


EDIT - pointed out in the comment that this is not the version of windows, it's the arch. FWIW- It's not the "real" arch, it's what WOW64 is reporting to the app. But you are right... if it's x32 powershell, it'll say x86. Often times this will get you what you want but...

Either way, is the registry location to the correct value, and here's a script.

Get-ChildItem HKLM:\HARDWARE\DESCRIPTION\System\CentralProcessor\ | Get-ItemProperty -Name Identifier | Select-Object -Property PSChildName,Identifier | ft -AutoSize
share|improve this answer
Perhaps because it's the processor architecture, and not the version of Windows? – Lost Hobbit Jan 8 '13 at 9:15

With PowerShell:

(gwmi win32_computersystem).SystemType


share|improve this answer
That's the type of processor, not Windows bitness. More Info: – John Homer Oct 9 at 20:02

I would assume you can just open a command prompt and type:

cd "C:\Program Files (x86)"

if you get somewhere, you got 64 bit.

share|improve this answer
That's not nearly reliable enough, I've seen software that installs to "C:\Program Files (x86)" on 32-bit Windows. – ThatGraemeGuy Jun 18 '09 at 16:22
Ehh, true. Someone had already beat me to the best answer, so I figured I'd give the lazy one. – MathewC Jun 18 '09 at 18:06
I think having this here downvoted is informative—thanks! – Nathan Nov 3 at 22:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.