Поделиться через


SetPowerState method of the CIM_ComputerSystem class

Sets the power state of the computer. The use of this method has been deprecated. Instead, use the SetPowerState method in the associated PowerManagementService class.

Syntax

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

Parameters

PowerState [in]

The power state to set.

This parameter can contain one of the following values:

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]

Indicates when to set the power state, either as a regular datetimevalue or as an interval value (where the interval begins when the method invocation is received).

Return value

A return code that indicates whether the operation completed successfully.

0

The operation completed successfully.

1

The operation was not completed because it is not supported.

2 ...

The operation was not completed because an error occurred.

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\Hardware
MOF
IpmiPrv.mof
DLL
IpmiPrv.dll

See also

CIM_ComputerSystem