PowerCli one liner to get the number of VMs per datacenter
April 29th, 2010
No comments
You have to have the snapin loaded and connected to your vcenter.
get-datacenter | sort name | %{$_.name; Get-vm -Location $_ | Measure-object| select Count}