Get VHD Information

Retrieves information on a virtual hard disk such as: Format, Type, Parent Path, and Fragmentation Percentage.

Input Parameters

Name Type Required Description
VHD Disk Path String Yes Specifies the path to the virtual hard disk file of the virtual hard disk to be retrieved. If a filename or relative path is specified, the path is calculated relative to the current working directory.

Output Parameters

Name Type Description
VHD Format String Returns the format of the VHD as VHD or VHDX.
VHD Type String Returns the type of virtual hard disk as Fixed, Dynamic or Differencing.
Parent Path String Returns the path of the parent VHD.
Fragmentation Percentage String Returns the fragmentation percentage of the VHD.
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
VHD Source Disk (ID or Path) String No

c:\test\testvhdx.vhdx

6