次の方法で共有


SetPowerState method of the CIM_LogicalDevice class

This method is deprecated. Instead, use the SetPowerState property of the CIM_PowerManagementService class.

Deprecated description: Sets the power state of the logical device.

Syntax

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

Parameters

PowerState [in]

The power state to set.

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)

Time [in]

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

Return value

0

The operation completed successfully.

1

The operation was not completed because it is not supported.

2 = value

The operation was not completed because an error occurred.

Requirements

Namespace
Root\virtualization
MOF
WindowsVirtualization.mof

See also

CIM_LogicalDevice