TestimoX

API Reference

Class

HyperVHostQuery

Namespace ComputerX.HyperV
Assembly ComputerX
Modifiers static

Queries native Hyper-V host state through the Hyper-V WMI v2 provider.

Inheritance

  • Object
  • HyperVHostQuery

Methods

public static HyperVHostInfo Get(String computerName = null, Nullable<TimeSpan> timeout = null) #
Returns: HyperVHostInfo

Gets Hyper-V host information from root\virtualization\v2.

Parameters

computerName System.String = null optionalposition: 0
Target computer name. Blank or . uses the local computer.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 1
Optional WMI query timeout.

Returns

Host information, or a warning object when Hyper-V WMI is unavailable.

public static async Task<HyperVHostInfo> GetAsync(String computerName = null, Nullable<TimeSpan> timeout = null, CancellationToken cancellationToken = null) #
Returns: Task<HyperVHostInfo>

Asynchronously gets Hyper-V host information from root\virtualization\v2.

Parameters

computerName System.String = null optionalposition: 0
Target computer name. Blank or . uses the local computer.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 1
WMI query timeout.
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
Cancellation token.

Returns

Host information, or a warning object when Hyper-V WMI is unavailable.