Sometimes you want a quick report of all the VMs, where their disks are, and what those names are in disk.
This is a quick PowerCLI script that reports VM Name, datastore, name on disk
$myVMs = get-vm
foreach($vm in $myVMs){
$myDisks = @($vm | get-harddisk)
foreach ($disk in $myDisks) {
write-host $vm.Name, ( $disk|select -ExpandProperty Filename)
}
}
You can download PowerCLI at http://www.vmware.com/go/powercli
