API Reference
Command
Get-CxHyperVVmResource
Gets native Hyper-V virtual machine CPU and memory allocation inventory through the Hyper-V WMI v2 provider.
Examples
Example 1: Retrieves VM CPU and memory allocation rows visible on the local Hyper-V host.
PS>
Get-CxHyperVVmResource
Example 2: Queries resource allocation rows for selected VM ids.
PS>
Get-CxHyperVVmResource -ComputerName HV01 -Name '*11111111-1111-1111-1111-111111111111*'
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Get-CxHyperVVmResource [-ComputerName <string[]>] [-Name <string[]>] [-TimeoutSeconds <int>] [<CommonParameters>]#Parameters
- ComputerName string[]
- Target computer names. Use . for the local machine or provide DNS/NetBIOS names. When omitted, the local computer is queried.
- Name string[]
- Optional wildcard patterns matched against VM id or WMI setting identity.
- TimeoutSeconds int
- Optional WMI timeout in seconds.
Outputs
ComputerX.HyperV.HyperVVirtualMachineResourceInfo