Share via


SetPowerState method of the CIM_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.

Full Power (1)

Power Save - Low Power Mode (2)

Power Save - Standby (3)

Power Save - Other (4)

Power Cycle (5)

Power Off (6)

Hibernate (7)

Soft Off (8)

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

Namespace
Root\virtualization
MOF
WindowsVirtualization.mof

See also

CIM_ComputerSystem