Check Virtual Hard Disks for VM

Quickly check the virtual hard disks (VHDs) attached to a virtual machine (VM).

John Savill

March 6, 2014

1 Min Read
Check Virtual Hard Disks for VM

Q: How can I quickly see all the virtual hard disks (VHDs) attached to a specific Hyper-V virtual machine (VM)?

A: The Windows PowerShell script below shows all the VHDs and whether they're connected via IDE or SCSI controller.

PS C:> Get-VM savdalfs01 | Get-VMHardDiskDrive VMName     ControllerType ControllerNumber ControllerLocation DiskNumber Path                                                          ------     -------------- ---------------- ------------------ ---------- ----                                                          savdalfs01 IDE            0                0                             E:virtualssavdalfs01Virtual Hard Diskssavdalfs01.vhdx     savdalfs01 SCSI           0                0                             E:virtualssavdalfs01Virtual Hard Diskssavdalfs01-data.vhdx

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like