A nice oneline script to show the total VM’s on your datastore:
Get-Datastore | Select Name, @{N="NumVM";E={@($_ | Get-VM).Count}} | Sort Name
Example output:
Name | NumVM |
VMFS_0 | 5 |
VMFS_1 | 2 |
A nice oneline script to show the total VM’s on your datastore:
Get-Datastore | Select Name, @{N="NumVM";E={@($_ | Get-VM).Count}} | Sort Name
Example output:
Name | NumVM |
VMFS_0 | 5 |
VMFS_1 | 2 |
I think you may have missed the source link for this script:
http://www.virtu-al.net/2009/09/23/powercli-how-many-vms-on-your-datastores/