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]
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.
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
Copyright © 2013 CA. All rights reserved. |
|