Compartir a través de


SetPowerState method of the Msvm_ComputerSystem class

Deprecated description: Sets the power state of the computer.

This method is deprecated. Instead, use the RequestPowerStateChange method in the CIM_PowerManagementService class.

Syntax

uint32 SetPowerState(
  [in] uint32   PowerState,
  [in] datetime Time
);

Parameters

PowerState [in]

The new state of the computer system.

1

Full Power

2

Power Save - Low Power Mode

3

Power Save - Standby

4

Power Save - Other

5

Power Cycle

6

Power Off

7

Hibernate

8

Soft Off

Time [in]

A regular date-time value or an interval value that indicates when to set the power state. If this is property contains an interval value, the interval must begin when the method invocation is received.

Return value

Returns "0" on success, otherwise returns a WMI error code.

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