Path to Powershell.exe (v 2.0)

前端 未结 4 1014
故里飘歌
故里飘歌 2020-12-13 05:13

Where is the Powershell (version 2.0) located? What is the path to Powershell.exe? I have Windows Server 2008 and Powershell installed. When I look at this folder:



        
4条回答
  •  醉酒成梦
    2020-12-13 05:50

    I believe it's in C:\Windows\System32\WindowsPowershell\v1.0\. In order to confuse the innocent, MS kept it in a directory labeled "v1.0". Running this on Windows 7 and checking the version number via $Host.Version (Determine installed PowerShell version) shows it's 2.0.

    Another option is type $PSVersionTable at the command prompt. If you are running v2.0, the output will be:

    Name                           Value
    ----                           -----
    CLRVersion                     2.0.50727.4927
    BuildVersion                   6.1.7600.16385
    PSVersion                      2.0
    WSManStackVersion              2.0
    PSCompatibleVersions           {1.0, 2.0}
    SerializationVersion           1.1.0.1
    PSRemotingProtocolVersion      2.1
    

    If you're running version 1.0, the variable doesn't exist and there will be no output.

    Localization PowerShell version 1.0, 2.0, 3.0, 4.0:

    • 64 bits version: C:\Windows\System32\WindowsPowerShell\v1.0\
    • 32 bits version: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\

提交回复
热议问题