Powershell.exe(v 2.0)的路径 [英] Path to Powershell.exe (v 2.0)
问题描述
Powershell(2.0版)在哪里?通往Powershell.exe的路径是什么?我安装了Windows Server 2008和Powershell.当我查看此文件夹时:
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:
PS C:\Windows\System32\WindowsPowerShell> dir
Directory: C:\Windows\System32\WindowsPowerShell
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 20.4.2010 17:09 v1.0
我只有Powershell v1.0.但是当我输入
I have only Powershell v1.0. But when I type
PS C:\> $Host.version
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
PS C:\>
它表明我已经安装了v2.0.
It shows that I have v2.0 installed.
推荐答案
我相信它在C:\Windows\System32\WindowsPowershell\v1.0\
中.为了混淆无辜者,MS将其保存在标有"v1.0"的目录中.在Windows 7上运行此程序,并通过$Host.Version
(确定已安装的PowerShell来检查版本号版本)显示为2.0.
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.
另一个选项是在命令提示符下键入$PSVersionTable
.如果您正在运行v2.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
如果您正在运行1.0版,则该变量不存在,并且将没有输出.
If you're running version 1.0, the variable doesn't exist and there will be no output.
本地化PowerShell版本1.0、2.0、3.0、4.0:
Localization PowerShell version 1.0, 2.0, 3.0, 4.0:
- 64位版本:C:\ Windows \ System32 \ WindowsPowerShell \ v1.0 \
- 32位版本:C:\ Windows \ SysWOW64 \ WindowsPowerShell \ v1.0 \
这篇关于Powershell.exe(v 2.0)的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!