PowerTip: Determine if PowerShell is a 64-Bit Version

Summary: Use Windows PowerShell to easily find out if the shell is a 64-bit version.

Hey, Scripting Guy! Question How can I use Windows PowerShell to determine if I am currently running a 64-bit version?

Hey, Scripting Guy! Answer Use the Is64BitProcess static method from the System.Environment class:


Comments (4)

  1. Chen V says:

    [intptr]::Size resulting 4 is 32 bit and 8 is 64 bit

  2. Greg Wojan says:

    It’s more specific to the .NET Framework v4.0. PowerShell 3.0 requires .NET 4.0. If you have PowerShell v2.0 configured to run on .NET 4.0 the command will work there as well.

  3. AD-Guru says:

    Is this for specific versions of PowerShell/.NET/Windows?

    I’m not seeing this as a static member.

Skip to main content