我在 Windows Server 2008 R2 中使用 Windows PowerShell 1.0。我已经在 Windows 8 中尝试过 PowerShell 3.0,对我来说它看起来不错。
现在的问题是:如何在 Windows Server 2008 R2 机器上升级 PowerShell?如果 3.0 对我不可用,那么有什么方法可以升级到最新的可用版本?
Name : ConsoleHost
Version : 2.0
InstanceId : f0b6480c-be55-429d-a197-65604de5887e
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Run Code Online (Sandbox Code Playgroud)
Jon*_*n J 33
PowerShell 2.0 包含在 Server 2008 R2 中。PowerShell 3.0 包含在 Windows 8 和 Server 2012 中。PowerShell 3.0 可以安装在 Server 2008 R2 上。
以下说明摘自该页面:http : //technet.microsoft.com/en-us/library/hh847837.aspx
在安装 Windows Management Framework 3.0 之前,请卸载任何以前版本的 Windows Management Framework 3.0。
从 Microsoft 下载中心 ( https://go.microsoft.com/fwlink/?LinkID=212547 ) 安装 Microsoft .NET Framework 4.0 (dotNetFx40_Full_setup.exe) 的完整安装。
或者,从位于https://go.microsoft.com/fwlink/?LinkID=242919的 Microsoft 下载中心安装 Microsoft .NET Framework 4.5 (dotNetFx45_Full_setup.exe) 。
从位于https://www.microsoft.com/en-us/download/details.aspx?id=34595的 Microsoft 下载中心安装 Windows Management Framework 3.0 。
该页面还介绍了如何在 Server 2008(非 R2)和 Windows 7 上安装 PowerShell 3.0。
这不可能。Windows PowerShell 2.0 包含在 Windows Server 2008 R2 中。您不能以任何受支持的方式在 2008 R2 中安装 Windows PowerShell 1.0。
要验证您正在运行的 PowerShell 版本,只需回显$host变量即可。
Name : Windows PowerShell ISE Host
Version : 3.0
InstanceId : 711f19be-3f19-4612-bea3-61899c1a73c2
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.Host.ISE.ISEOptions
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
128577 次 |
| 最近记录: |