1

I am trying to use the Out-GridView cmdlet on a Windows Server 2008 R2 box. It complains that it can't run because I need to install the Windows Powershell Integrated Scripting Environment feature. The problem is, that is already installed. Not sure what the problem is or how to troubleshoot this.

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... {}
1

I upgraded to PowerShell 3.0 by following: http://technet.microsoft.com/en-us/library/hh847837.aspx and it started working. No idea why.

  • Out-Gridview was only introduced in PowerShell 3.0 – HipCzeck Jul 14 '14 at 15:29
  • It seems that way. I also have found documentation that it is part of PowerShell 2. computerperformance.co.uk/powershell/… – Shane Wealti Jul 14 '14 at 16:37
  • @ShaneWealti, possibly that reviewer was looking at a preview that never occurred? The official docs say v3+ technet.microsoft.com/en-us/library/hh849920.aspx – AnneTheAgile Jan 7 '15 at 19:16
  • 1
    @AnneTheAgile, Thanks! I think I figured out what is going on. According to the link you posted, for non-server OS Powershell 2 included Out-Gridview by default but for server-OS it is not included until PowerShell 3. I was using a server OS so that explains why it didn't work in 2. – Shane Wealti Jan 7 '15 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.