SetVirtualDesktopState method of the Win32_RDMSVirtualDesktop class

Updates the state of the virtual desktop.

Syntax

uint32 SetVirtualDesktopState(
  [in] uint32 VMState
);

Parameters

VMState [in]

A value that specifies the new state of the virtual machine.

This parameter can bet set to one of the following values:

Unknown (0 (Default))

The state of the virtual machine could not be determined.

Enabled (2)

The virtual machine is running.

Disabled (3)

The virtual machine is turned off.

Paused (32768)

The virtual machine is paused.

Suspended (32769)

The virtual machine is in a saved state.

Starting (32770)

The virtual machine is starting.

Saving (32773)

The virtual machine is saving its state.

Stopping (32774)

The virtual machine is turning off.

Pausing (32776)

The virtual machine is pausing.

Resuming (32777)

The virtual machine is resuming from a paused state.

Return value

Returns 0 on success, otherwise returns a WMI error code.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\CIMv2\rdms
MOF
RDManagement.mof
DLL
RDMS.dll

See also

Win32_RDMSVirtualDesktop