How can I determine if I installed a 32-bit or 64-bit version of Windows Server 2008

436025 pts.
Tags:
Windows PowerShell
Windows Server 2008
I'm using a PowerShell console and I need to know the different commands that can be executed to find out if the 32-bit or 64-bit version of Windows Server 2008 is installed. I appreciate the help.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Using WMI:

Get-WmiObject Win32_OperatingSystem | Select-Object OSArchitecture


By looking at the size of the InPtr structure:

if ([System.IntPtr]::Size -eq 4) { "32-bit" } else { "64-bit" }


And, in .Net 4 or earlier, this would tell you if it is running on a 64 bit OS:

[environment]::Is64BitOperatingSystem


Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: