Powershell 32-bit and 64-bit version

Powershell 32-bit and 64-bit version

64-bit: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
32-bit: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe

alternative way to determine if your are running 32 version or 64 version:
PS C:\Windows\System32\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 4) { "32-bit" }
PS C:\Windows\System32\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 8) { "64-bit" }
64-bit
PS C:\Windows\System32\WindowsPowerShell\v1.0> [Environment]::Is64BitProcess
True
==============
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 4) { "32-bit" }
32-bit
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0>  if ([System.IntPtr]::Size -eq 8) { "64-bit" }
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> [Environment]::Is64BitProcess
False

==============

http://msdn.microsoft.com/library/system.intptr.aspx

转载请注明: 转载自Legend‘s BLog

本文链接地址: Powershell 32-bit and 64-bit version



请尊重作者,转载请以链接形式标明原文地址