PowerCLI installed on Windows2012 and working in PS Webaccess
Today my adventures continues, I had to test and install the PowerCLI on a Windows 2012 RC to see if it works and also if it could be used in the new Windows 2012 feature PowerShell Webaccess.
In an earlier post I showed how to configure the PowerShell Webaccess, then I was not successful to run the PowerCLI, the difference here is that I now installed the PowerCLI on the Win 2012 server.
To be able to install i had to enable the .net 2.0 (why the PowerCLI is built on that version is another discussion we will not go into here), as you can see on the dialog I had to enable that

Ok, and that should be done with PowerShell or? My server did not have an active Internet connection so I got a failure when trying to enable the .Net Framework, I had to use the Dism tool with the install media to get the .Net installed as it otherwise downloads the files necessary from MS.

dism /online /enable-feature /featurename:NetFx3 /all /source:D:\sources\sxs
When this is enabled then there was no problem installing the PowerCLI and when installed I can use for example the V3 functions Get-VM | where powerstate -eq “PoweredOn” <- notice I am not using any curly brackets and $_

Now to the Webaccess, I connect to the site https://pstest.vniklas.com/pswa and log on with an authorized account. After that I run Add-PSSnapin VMware.VimAutomation.Core to enable the PowerCLI functionality . Then i need to get the credential before connecting to the vCenter because the pswa could not show the promt for credential.

But that is easily fixed by using $cred = Get-Credential and then Connect-VIServer vc.vniklas.com -Credential $cred 🙂 and as you can see I can now connect and use the PowerCLI in a web browser.

May the PowerCLI be with you!