PowerCLI: Match VM and Windows hard disks

From VI-Toolkit
Jump to navigation Jump to search

Map VM Disks

Author: Arnim van Lieshout


Based on the Get VMware Disk Usage with Powershell script by Hugo Peeters, this script will identify the locations of the virtual disks used by your virtual machines.

Arnim explains how the mechanism in windows works, which is a little bit different from what you would expect and then applies his knowledge to both Powershell as well as WMI scripts to retrieve the details he needs for getting this to work. He even throws in how-to add this code to the VESI Powerpack

The information retrieved per VM is:

  • SCSI Controller
  • DiskName
  • Disk File
  • Disk Size
  • Windows Disk ID


Match VM and Windows harddisks using PowerCLI

Match VM and Windows harddisks part 2