List All VM’s currently registered in vcenter living on a specific datastore
get-datastore DATASTORENAME | get-vm
Here is a quick one to disable the “ssh has been enabled for this host” warning on all hosts you manage. (already connected “connect-viserver yourhost”)
Get-VMHost | Get-AdvancedSetting -Name 'UserVars.SuppressShellWarning' | Set-AdvancedSetting -Value "1" -Confirm:$false
I am finishing up the new VMware lab at work and need to document the setup. Part of this documentation includes getting all the ip’s on each VMhost and their corresponding use. A quick and easy way to do this is to leverage the awesomeness of PowerCLI.
So, here is a great one-liner that requires little post formatting to get what you need:
Get-VMHostNetworkAdapter | select vmhost,portgroupname,ip | Export-Csv c:\YourDirectory\network.csv