How to install PowerCLI module on Windows computer

Installing PowerCLI for VMWare on a Windows machine is very easy.  Here I’m installing on Win 2012 R2.

First, we need to check the version of PowerShell and upgrade to version 5.1 if it is not. The latest version can be downloaded from Microsoft Site. It will require a restart.

				
					#Check Powershell Version
Get-Host | Select-Object Version
				
			

Second, we need to check if Nuget provider is available or not. Nuget is a Microsoft-supported mechanism for sharing .NET code. For more information please check here. If not available we have to make it available.

You may get an error while trying to install Nuget package provider – “WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «»”, In that case, follow the link of StackOverflow and it should resolve the issue.

				
					#Check if Nuget Package Provider is available or Not
Get-packageprovider -Listavailable
#Remove unable to download error while installing Nuget package provider, Run as admin
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
#Install Nuget package provider
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.208 -Force

				
			

And third, Install the PowerCLI module.

				
					#Install PowerCLI
Install-Module -Name VMware.PowerCLI

				
			
Check Our

Related Posts