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.
class Win32_LogonSession : Win32_Session { string AuthenticationPackage; string Caption; string Description; datetime InstallDate; string LogonId; uint32 LogonType; string Name; datetime StartTime; string Status; };
The Win32_LogonSession class defines the following members:
The Win32_LogonSession class defines the following properties.
Name of the subsystem used to authenticate the logon session. This property is inherited from Win32_LogonSession.
String that represents the short description (one-line string) of the object. This property is inherited from CIM_ManagedSystemElement.
Textual description of the object. This property is inherited from CIM_ManagedSystemElement.
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.
ID assigned to the logon session.
Numeric value that indicates the type of logon session.
Used only by the System account.
Intended for users who are interactively using the machine, such as a user being logged on by a terminal server, remote shell, or similar process.
Intended for high-performance servers to authenticate clear text passwords. LogonUser does not cache credentials for this logon type.
Intended for batch servers, where processes can be executed on behalf of a user without their direct intervention; or for higher performance servers that process many clear-text authentication attempts at a time, such as mail or Web servers. LogonUser does not cache credentials for this logon type.
Indicates a service-type logon. The account provided must have the service privilege enabled.
Indicates a proxy-type logon.
This logon type is intended for GINA DLLs logging on users who are interactively using the machine. This logon type allows a unique audit record to be generated that shows when the workstation was unlocked.
Windows Server 2003, Windows 2000, and Windows XP: Preserves the name and password in the authentication packages, allowing the server to make connections to other network servers while impersonating the client. This allows a server to accept clear text credentials from a client, call LogonUser, verify that the user can access the system across the network, and still communicate with other servers.
Windows Server 2003, Windows 2000, and Windows XP: Allows the caller to clone its current token and specify new credentials for outbound connections. The new logon session has the same local identify, but uses different credentials for other network connections.
Terminal Services session that is both remote and interactive.
Attempt cached credentials without accessing the network.
Same as RemoteInteractive. This is used for internal auditing.
Workstation logon.
Defines the label by which the object is known. This property is inherited from CIM_ManagedSystemElement.
The time at which the session started. This property is inherited from Win32_Session.
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:
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.
Send comments about this topic to Microsoft
Build date: 1/8/2010
Build type: MSDN
I just wish that MSDN had the properties hyperlinked down to the property description like it used to be.