Those who have experience in VMWare know that there is no 1 to 1 match between VM’s disk number and the disk inside guest OS.
You can use this script to export disk mappings to grid or to a csv file:https://github.com/PKGeorgiev/PowerShell-VMWare/blob/master/Get-VmDiskToWindowsDiskMapping.ps1
This script is a slight modification of Conrad’s version with some improvements:
- Allow pipelining
- Use Guest’s hostname in all WMI calls instead of VM’s name (they can differ)
- Formatting and error checking