我如何使用PowerShell 2?


0

我主要在Windows 7机器上工作; 有时在Windows 2003 R2服务器或Windows 2008 R2服务器上。我的理解是Windows 7和Windows 2008都附带了PowerShell 2,也许Windows 2003附带了PowerShell 2。但是,当我执行Run Powershell是PowerShell运行的窗口的标题,它使用PowerShell的第1版显示它。我如何运行版本2?


那是哪个操作系统?怎么$Host.Version说?
Indrek 2012年

Answers:


6

我怀疑你的意思是存储PS 的路径(可能会显示在标题中)。它与实际的PowerShell版本几乎没有关系。最好的测试是键入:$ PSVersionTable。

截图

v1>没有显示
v2,3和可能所有未来版本 - >返回当前版本的信息。


谢谢,我不知道$ PSVersionTable。便利。你是对的,当我发出那个命令时,我得到版本2,这就是我在这台机器上的全部内容。再次感谢!
Rod
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.