Please ignore CPU, Memory. I need one csv document containing the following:
Resource Group
VM Name
VMDK name (or even better the folder the VMDK(s) are in)
Datastore
Storage format and capacity is useful too.
I have managed to gather VM Name, Resource pool, and Datastores Name but also want VMDKs on each VMs, storage capacity and format too.
Connect-VIServer ......................
Get-VM |
Select Name,
@{N="Datastore";E={[string]::Join(',',(Get-Datastore -Id $_.DatastoreIdList | Select -ExpandProperty Name))}},
@{N="ResourcePool";E={$_ | Get-ResourcePool}} |
Export-Csv C:\Sysadmin\scripts\Geoff\ResourcePoolReport.csv -NoTypeInformation -UseCulture