Compartir a través de


SetPowerState method of the CIM_UnitaryComputerSystem class

Defines the desired power state of a computer system and its running operating system, and when the system should be put into that state.

Syntax

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

Parameters

PowerState [in]

Specifies the new power state.

Unknown (0)

Full Power (1)

Power Save - Low Power Mode (2)

Power Save - Standby (3)

Power Save - Unknown (4)

Power Cycle (5)

Power Off (6)

Power Save - Warning (7)

Time [in]

Indicates when the power state should be set, either as a regular date-time value or as an interval value (where the interval begins when the method invocation is received). When the PowerState parameter is equal to 5, "Power Cycle", the Time parameter indicates when the system should power on again. Power off is immediate.

Return value

Returns 0 if successful, 1 if the specified power state and time requests are not supported, and some other value if any other error occurred.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Namespace
Root\MicrosoftNLB
MOF
WlbsProv.mof
DLL
WlbsProv.dll

See also

CIM_UnitaryComputerSystem