Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 231085

Script to get VM list and count on datastore

$
0
0

Hi All,

 

I have one liner script which gives me number of VMs on datastore, i was looking to get both number of VMs plus VM names also.

 

 

Get-Datastore | Select Name, @{N="NumVM";E={@($_ | Get-VM).Count}} | Sort Name | export-csv -path "C:\Users\userA\Desktop\Cluster_Host_Report\datastorevmcount.csv"

 

 

the above script gives only no. or count of VMs on datastore in VC, can we get which all VMs are there on datastore in VC.

 

 

Thanks a ton in advance.


Viewing all articles
Browse latest Browse all 231085

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>