Export (0) Print
Expand All

Win32_Terminal class

The Win32_Terminal WMI class represents a terminal.

The following syntax is simplified from MOF code and includes all defined and inherited properties, in alphabetical order. For reference information on methods, see the table of methods later in this topic.

Syntax

[dynamic, overwrite, provider("Win32_WIN32_TERMINAL_Prov")]class Win32_Terminal : CIM_LogicalElement
{
  string   Caption;
  string   Description;
  uint32   fEnableTerminal;
  datetime InstallDate;
  uint32   LoggedOnUsers;
  string   Name;
  string   Status;
  string   TerminalName;
};

Members

The Win32_Terminal class has these types of members:

Methods

The Win32_Terminal class has these methods.

MethodDescription
Create

Creates a terminal with default settings which can be customized by using the properties and methods of the Win32_TerminalSetting classes.

Windows Server 2003:  This method is not available.

Delete

Deletes the specified terminal.

Windows Server 2003:  This method is not available.

Enable

Disables or enables the terminal.

Rename

Renames the terminal.

 

Properties

The Win32_Terminal class has these properties.

Caption
Data type: string
Access type: Read-only

Short description (one-line string) of the object. This property is inherited from CIM_ManagedSystemElement.

Description
Data type: string
Access type: Read-only

Description of the object. This property is inherited from CIM_ManagedSystemElement.

fEnableTerminal
Data type: uint32
Access type: Read-only

Specifies whether the specified terminal is disabled or enabled.

ValueMeaning
0 (0x0)

The terminal is disabled.

1 (0x1)

The terminal is enabled.

 

InstallDate
Data type: datetime
Access type: Read-only

Date and time when the object was installed. A lack of a value does not indicate that the object is not installed. This property is inherited from CIM_ManagedSystemElement.

LoggedOnUsers
Data type: uint32
Access type: Read-only

Number of logged-on sessions for the terminal.

Windows Server 2003:  This property is not available.

Name
Data type: string
Access type: Read-only

Object label. This property is inherited from CIM_ManagedSystemElement.

Status
Data type: string
Access type: Read-only
Qualifiers: MaxLen (10)

Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. This property is inherited from CIM_ManagedSystemElement. Values are:

"OK"

"Error"

"Degraded"

"Unknown"

"Pred Fail"

"Starting"

"Stopping"

"Service"

"Stressed"

"NonRecover"

"No Contact"

"Lost Comm"

TerminalName
Data type: string
Access type: Read-only
Qualifiers: Key

The unique name that identifies the instance of the terminal.

Remarks

Win32_Terminal is associated with Win32_TerminalSetting as the Element property of the Win32_TerminalTerminalSetting association.

The following classes are subclasses of the Win32_Terminal class: Win32_TSGeneralSetting, Win32_TSLogonSetting, Win32_TSSessionSetting, Win32_TSEnvironmentSetting, Win32_TSRemoteControlSetting, Win32_TSClientSetting, Win32_TSNetworkAdapterSetting, Win32_TSNetworkAdapterListSetting, Win32_TSPermissionsSetting, and Win32_TSAccount.

Note that Winstations associated with the console session cannot access the methods and properties of this class. If an attempt is made to do so by specifying "Console" as the value of the TerminalName property, methods of this object return WBEM_E_NOT_SUPPORTED. This error code is also returned if a window station attempts to call methods of this object to add or modify the security properties of the LocalSystem, LocalService, or NetworkService accounts.

To connect to the \root\CIMV2\TerminalServices namespace, the authentication level must include packet privacy. For C/C++ calls, this is an authentication level of RPC_C_AUTHN_LEVEL_PKT_PRIVACY. For Visual Basic and scripting calls, this is an authentication level of WbemAuthenticationLevelPktPrivacy or "pktPrivacy", with a value of 6. The following Visual Basic Scripting Edition (VBScript) example shows how to connect to a remote computer with packet privacy.


strComputer = "RemoteServer1" 
Set objServices = GetObject( _
    "winmgmts:{authenticationLevel=pktPrivacy}!Root/CIMv2/TerminalServices")


Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Microsoft Windows Software Development Kit (SDK). They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2\TerminalServices on Windows Vista and Windows Server 2008, \root\CIMV2 on Windows Server 2003

MOF

TsCfgWmi.mof

DLL

TsCfgWmi.dll

See also

Win32_TerminalServiceSetting
Win32_TerminalTerminalSetting

 

 

Show:
© 2014 Microsoft