Please refer to the steps below on how to install VMware PowerCLI 10 on Windows 2012R2 Server
- Upgrade the PowerShell 4.0 to PowerShell 5.1
- Install Nuget Prackage Provider
- Download the VMware PowerCLI (Offline Install) and copy all the modules to $pshome\module
- Ignore the SelfSign Certificate Warning when connecting to vSphere Host / vCenter
- Import the Module and connect to vSphere Host / vCenter
Windows 2012R2 Server is installed with PowerShell 4.0
PS C:\Users\Administrator> $PSVersionTable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.34011
BuildVersion 6.3.9600.16394
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
Download the Windows Management Framework 5.1 to upgrade the PowerShell 4.0 to 5.1 – Server reboot is required
PS C:\Users\Administrator> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.34011
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Install NuGet Package Provider
#Package Management providers
Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force </code></pre>
<strong>Copy the Downloaded PowerCLI Module, import the module and login to vSphere host </strong>
<pre><code class="lang-powershell">#Offline Install
Save-Module -Name VMware.PowerCLI -Path c:\temp\PowerCLI
#Copy Downloaded PowerCLI Module to $psHome\Module
Copy-Item C:\Temp\PowerCLI -Destination C:\$pshome/Module -Recurse
#Ignore the Selfsign Certificate warning when connecting to vSphere Host / vCenter
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
Import-Module VMware.VimAutomation.Core
#Login to vCenter / vSphere Host
Connect-VIServer -Server 192.168.1.188 -User root -Password P@ssw0rd