I wanted to output some data with PowerCLI using the Out-GridView cmdlet. Reason for using this cmdlet is that I needed to create an index for the .vmdk’s attached to the virtual machines and the number varies, however I encountered the following error on my system:
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=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.)
After some troubleshooting I discovered that this can be resolved easily by installing PowerShell ISE, which is an optional feature and requires .Net 3.5 SP1, to install this on Windows Server 2008 R2, use the Add Features Wizard or run the following Powershell command:
Import-Module ServerManager; Add-WindowsFeature PowerShell-ISE
-ray