Previous Topic: dpmhv-getVMInfo (Funclet) Command--Show all VMsNext Topic: dpmhv-getVMState (Funclet) Command--Show the VM State


dpmhv-getVMProperties (Funclet) Command--Show VM Properties

The dpmhv-getVMProperties command retrieves the properties of the VM such as CPU, memory, and actions settings.

This command has the following format:

dpmhv-getVMProperties 
-vm vmname|-vmid vmguid 
-host hostname 
[-retval] 
[-silent]
-vm vmname

Specifies the name of the VM.

-vmid vmguid

Specifies the unique ID of the VM.

-host hostname

Specifies the name of the Hyper-V server host.

-retval

Returns a value for further processing.

-silent

Specifies not to direct the output to the screen.

Return Value

The dpmhv-getVMProperties command returns objects where each object represents the VM properties as follows:

Example: Show VM Properties

This example displays the following VM properties: VM CPU and memory allocation.

dpmhv-getVMProperties -host hvserver -vm TestVM

Example: Show CPU and Memory Allocation of VM

This example displays the CPU and the memory allocation of the VM, "TestVM."

props=dpmhv-getVMProperties -host hvserver -vm TestVM -retval -silent
? "Memory:", props.memory+"MB"
? "CPU cores:", props.cpu.cpuSocketCount