次の方法で共有


RequestStateChange method of the Msvm_ComputerSystem class

Requests a state change on the computer system.

Syntax

uint32 RequestStateChange(
  [in]  uint16              RequestedState,
  [out] CIM_ConcreteJob REF Job,
  [in]  datetime            TimeoutPeriod
);

Parameters

RequestedState [in]

The requested state change.

The possible values are:

Enabled (2)

Disabled (3)

Shut Down (4)

Offline (6)

Test (7)

Defer (8)

Quiesce (9)

Reboot (10)

Reset (11)

DMTF Reserved

12 32767

Vendor Reserved

32768 65535

Job [out]

A reference to an optional job for the operation if the operation is run asynchronously.

TimeoutPeriod [in]

A timeout period that specifies the maximum amount of time that the client expects the transition to the new state to take. A value of "0" or NULL indicates that the client has no time requirements for the transition. If this property does not contain "0" or NULL and the implementation does not support this parameter, the return code "Use Of Timeout Parameter Not Supported" is returned.

Return value

The possible return values are:

0

Completed with No Error

4096

Method Parameters Checked - Job Started

32768

Failed

32769

Access Denied

32770

Not Supported

32771

Status is unknown

32772

Timeout

32773

Invalid parameter

32774

System is in use

32775

Invalid state for this operation

32776

Incorrect data type

32777

System is not available

32778

Out of memory

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\HyperVCluster\v2
MOF
WindowsHyperVCluster.V2.mof
DLL
VMMS.exe

See also

Msvm_ComputerSystem