Advertisement Header

Monday, 14 June 2010

PowerCLI: One-Liner to get VMs, Clusters, ESX Hosts and Datastores

Get-VM | Select Name, @{N="Cluster";E={Get-Cluster -VM $_}},
@{N="ESX Host";E={Get-VMHost -VM $_}},
@{N="Datastore";E={Get-Datastore -VM $_}} |
Export-Csv -NoTypeInformation C:\Scripts\VM_CLuster_Host_Datastore.csv

No comments:

Post a Comment