I am trying to attain the list of VMs and their Datastores in a particular cluster. It seems the Datastore Name is not resulting.. Any ideas?
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> Get-Cluster "clustername" | Get-VM -Name * | Get-HardDisk | Export-Csv -NoTypeInform
ation c:\Scripts\***.csv
Get-Cluster **** | Get-VM | Select Name,
@{N="Cluster";E={Get-Cluster -VM $_}}, `
@{N="ESX Host";E={Get-VMHost -VM $_}}, `
@{N="Datastore";E={Get-Datastore -VM
$_}}
Get-Cluster **** | Get-VM | Select Name,
@{N="Cluster";E={Get-Cluster -VM $_}}, `
@{N="ESX Host";E={Get-VMHost -VM $_}}, `
@{N="Datastore";E={Get-Datastore -VM
$_}}
