Win32_LogonSession class
The Win32_LogonSession WMI class describes the logon session or sessions associated with a user logged on to a computer system running Windows NT or Windows 2000.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties and methods are in alphabetic order, not MOF order.
Syntax
class Win32_LogonSession : Win32_Session
{
string AuthenticationPackage;
string Caption;
string Description;
datetime InstallDate;
string LogonId;
uint32 LogonType;
string Name;
datetime StartTime;
string Status;
};
Members
The Win32_LogonSession class has these types of members:
Properties
The Win32_LogonSession class has these properties.
- AuthenticationPackage
-
- Data type: string
- Access type: Read-only
Name of the subsystem used to authenticate the logon session. This property is inherited from Win32_LogonSession.
- Caption
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen (64)
String that represents the short description of the object. This property is inherited from CIM_ManagedSystemElement.
- Description
-
- Data type: string
- Access type: Read/write
Textual description of the object. This property is inherited from CIM_ManagedSystemElement.
- InstallDate
-
- Data type: datetime
- Access type: Read-only
Represents the date and time the object was installed. This property does not require a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.
- LogonId
-
- Data type: string
- Access type: Read-only
ID assigned to the logon session.
- LogonType
-
- Data type: uint32
- Access type: Read-only
Numeric value that indicates the type of logon session.
- Name
-
- Data type: string
- Access type: Read-only
Defines the label by which the object is known. This property is inherited from CIM_ManagedSystemElement.
- StartTime
-
- Data type: datetime
- Access type: Read-only
The time at which the session started. This property is inherited from Win32_Session.
- Status
-
- Data type: string
- Access type: Read-only
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 function properly, but predicts a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The Service status applies to administrative work, such as mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither "OK" nor in one of the other states.
The values are:
- "OK"
- "Error"
- "Degraded"
- "Unknown"
- "Pred Fail"
- "Starting"
- "Stopping"
- "Service"
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012