LIst all VMs Disk in Hyper-V (VMM)
Here an easy way to list all your VMs disk. This will be useful if need to check what disk has every machine. you can then copy the output to excel $vms=Get-vm -All $file="listvms.txt" for($i=0;$i -lt $vms.count;$i++){foreach($disk in $vms[$i].VirtualHardDisks.sharepath){ $s=$vms[$i].name+";"+$disk; Write-Output $s | Out-File $file -append utf8}} notepad $file Be aware that second time, you shuld use a different file, otherwise you will be adding the results to the same file