Tag: install-module

Powershell and PowerCLI

Have you ever wanted to work on your VMware environment and your Windows environment using one command line tool? Maybe write scripts for both with the same tool? Powershell with VMware PowerCLI cmdlets allow you to stay in PowerShell and manage both. Let’s start with some the basics. Ensure you can connect to the Powershell Gallery and find the VMware.PowerCLI Powershell module.
Run: Find-Module -Name VMware.PowerCLI

Install the VMware PowerCLI module
Run: Install-Module -Name VMware.PowerCLI

Check the number of cmdlets installed
Run: Get-Command -Module *vmware* | measure

Connect to a vCenter using connect-viserver – server <your vcenter> and try this simple command.
Run: Get-VMhost

Try some of the other commands. They will make your life easier. There are many more third party PowerShell modules. Visit the Powershell Gallery. At last count, there were over 31,000 packages.