Use PowerShell and VMware vSphere


Install-Module -Name VMware.PowerCLI

After installing the  PowerCLI  , run below command to see how many  commands over the PowerShell

get-command -module *VMware* measure

Connect to VMware vCenter

Connect-VIServer -Server <IP/FQDN> -Protocol https -User <username> -Password <password>

pls click here,if you received error “Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration”

Now you are connected with vsphere and can gether information like

Command Get-VM. To retrieve VM list

Command  Get-VMHost | FL * to retrieve host info

Tags: , ,

Leave a Reply

Your email address will not be published.