I'm try to get a report of only the number of Windows VM's per esx host. The report needs to show the host names and the number of windows VM's on each. Can anyone help?
Regards
Try like this.
The script assumes that the VMware Tools are installed on all VMs.
Get-VMHost |
Select Name,@{N='WinVM';E={(Get-VM -Location $_ | where{$_.Guest.OSFullName -match "Windows"}).Count}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this.
The script assumes that the VMware Tools are installed on all VMs.
Get-VMHost |
Select Name,@{N='WinVM';E={(Get-VM -Location $_ | where{$_.Guest.OSFullName -match "Windows"}).Count}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Perfect thanks!