我试图在Windows 2008 R2框上使用。它抱怨说它无法运行,因为我需要安装Windows集成脚本环境特性。问题是,它已经安装了。不确定是什么问题,也不知道如何解决这个问题。
PS C:\Share\Jred\PowerShell> import-module servermanager
PS C:\Share\Jred\PowerShell> Get-WindowsFeature PowerShell-ISE
Display Name Name
------------ ----
[X] Windows PowerShell Integrated Scripting Environm... PowerShell-ISE
PS C:\Share\Jred\PowerShell> get-process | out-gridview
out-gridview : To use the Out-GridView cmdlet, install the Windows PowerShell Integrated Scripting Environment feature
from Server Manager. (Could not load file or assembly 'Microsoft.PowerShell.GraphicalHost, Version=1.0.0.0, Culture=neu
tral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.)
At line:1 char:27
+ get-process | out-gridview <<<<
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...1bf3856ad364e35:AssemblyName) [Out-GridView], NotSupp
ortedException
+ FullyQualifiedErrorId : ErrorLoadingAssembly,Microsoft.PowerShell.Commands.OutGridViewCommand
PS C:\Share\Jred\PowerShell> Import-Module ServerManager; Add-WindowsFeature PowerShell-ISE
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True No NoChan... {}发布于 2014-07-08 13:26:02
我通过以下方式升级到PowerShell 3.0:http://technet.microsoft.com/en-us/library/hh847837.aspx并开始工作。不知道为什么。
https://serverfault.com/questions/610938
复制相似问题