Hi All,
Ive been looking for a script for awhile time today and can't seem to find the one I need.
Need the script to List out all the Guests, their disks, and if they are independent or not.
Seems we ran into a fiasco and will need to make some major changes, uugh....
Thank you for your help..!!
Try this:
$results = @()
foreach ($vm in Get-VM)
{
foreach ($vmHardDisk in $vm | Get-HardDisk)
{
$out = "" | select Guest,DiskName,DiskFilename,DiskPersistence
$out.Guest = $vm.Name
$out.Diskname = $vmHardDisk.Name
$out.DiskFilename = $vmHardDisk.Filename
$out.DiskPersistence = $vmHardDisk.Persistence
$results += $out
}
}
$results | ft -AutoSize