Some of may already know that VMware has released the PowerShell 6.5.1 and there are lot’s of changes and improvements in the Modules, cmdlets and installation process. You may installed the PowerCLI as a separate component in your local management computer and used the PowerCLI cmd console to execute the commands. With this release you don’t need to worry about the separate installation for this as it comes as a PowerShell module in the PowerShell Gallery.
Here are the steps of online installation of the PowerCLI from the PowerShell Gallery.
I was trying to install this on one of our management server which was setup with Windows Server 2008 R2 SP1. It was a fresh installation and “Find-Module” command was not recognized as a PowerShell command. So I downloaded the “Windows Management Framework 5.0” from the Microsoft website and installed the update for the Windows 2008 manually.
After that, I opened a PowerShell with “Run as Administrator” and followed the below steps.
Typed the “Find-Module -Name VMware.PowerCLI” PowerShell command and it installed the NuGet Provider to download the PowerCLI modules and typed “Y” to continue the NuGet installation
Typed “Install-Module -Name VMware.PowerCLI” to install the required modules, it gave me a warning saying this is an “Untrusted Repository” typed “Y” to accept the warning.
It started the installation after that
Once it completed the installation typed “Get-Module VMware* -ListAvailable” command to view the available modules
I tried to connect to the vCenter and it was successfully connected
These steps are only for the online installation, if you have a Management computer which doesn’t have an internet connectivity you need to save them as a offline copy and need to copy to the modules folder in the Management computer.
For that followed the below steps :
Used “Save-Module -Name VMware.PowerCLI -Path C:<destination_folder> to save the modules as offline copies.
It was exported the libraries to the given folder
Checked and confirmed the libraries by typing “Get-ChildItem -Path <destination_path_of_the_libraries”>
Checked the folder path manually and folders were there
Copied these folders to the location which you can see after executing the “$ENV.PSModulePath” command
Create a Desktop Shortcut for the PowerCLI console
Most of VMware users want to keep the PowerCLI launch shortcut in their desktops. It was the practice for the later versions of the PowerCLI. Here you have to create a Shortcut manually in your desktop.
In the start menu search the PowerCLI and Create a generic x64 shortcut in your desktop
Name it as “PowerCLI 6.5.1”
Right-Clicked on the Shortcut and selected the properties of the PowerCli shortcut, added the below attributes