Share via


SetPowerState method of the MSFTSM_ComputerSystem class

Sets the power state of the computer. This method is deprecated. Instead, use the SetPowerState method in the associated power management service class.

This method is inherited from the CIM_ComputerSystem class.

Syntax

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

Parameters

PowerState [in]

Specifies the requested power state.

The possible values are.

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]

Specifies when the power state is to be set.

Return value

Returns zero on success; otherwise returns an error code.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2
Namespace
Root\CIMv2\Storage\iScsiTarget
MOF
SmIscsiTarget.mof
DLL
SmIScsiTargetProv.dll

See also

MSFTSM_ComputerSystem