The dpmhv-ShowVMDisks command displays all virtual disks in a VM on a Hyper-V host server.
This command has the following format:
dpmhv-showVMDisks -vm vmname|-vmid vmguid -host hostname [-retval] [-silent] [-detail]
Specifies the name of the VM.
Specifies the unique ID of the VM.
Specifies the name of the Hyper-V server host.
Returns a value for further processing.
Specifies not to direct the output to the screen.
(Optional) Displays the details of the list of virtual disks.
The dpmhv-ShowVMDisks command returns an array of objects which represents the disks attached to a VM.
The following properties are returned in regular mode:
The following properties are returned in detail mode:
Example: Show all Virtual Disks of a VM
This example returns the list of virtual disks attached to the VM.
dpmhv-showVMDisks -host hvserver -vm TestVM
Example: Show all Disks and Virtual Hard Drive Image Files
This example returns the list of disk and virtual hard drive image files attached to the VM.
dd = dpmhv-showVMDisks -host hvserver -vm TestVM -detail -retval -silent for each(d in dd) { if(d.ResourceSubType=="Microsoft Virtual Hard Disk") { ? d.Connection } }
Copyright © 2013 CA. All rights reserved. |
|