- WMI Library -
WMI Libraly > Win32_LogonSession Class

Win32_LogonSession Class

The Win32_LogonSession class describes the logon session or sessions associated with a user who has logged on to Windows NT or Windows 2000.
Namespace value is root/CIMV2.
WMI Provider value is CIMWin32.


  • AuthenticationPackage
  • The AuthenticationPackage is the name of the subsystem used to authenticate the logon session.

  • Caption
  • The Caption property is a short textual description (one-line string) of the object.

  • Description
  • The Description property provides a textual description of the object.

  • InstallDate
  • The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

  • LogonId
  • The LogonId is the ID assigned to the logon session. The application that initiated the session should have called AllocateLocallyUniqueId in order to generate this ID.

  • LogonType
  • The LogonType is a numeric value indicating what type of logon session this is.
    System - Interactive - This logon type is intended for users who will be interactively using the machine, such as a user being logged on by a terminal server, remote shell, or similar process.
    Network - This logon type is intended for high performance servers to authenticate clear text passwords. LogonUser does not cache credentials for this logon type.
    Batch - This logon type is intended for batch servers, where processes may be executing 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.
    Service - Indicates a service-type logon. The account provided must have the service privilege enabled.
    Proxy - Proxy logon. This logon type is not supported.
    Unlock - This logon type is intended for GINA DLLs logging on users who will be interactively using the machine. This logon type allows a unique audit record to be generated that shows when the workstation was unlocked.
    Network Cleartext - Windows 2000: This logon type 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.
    New Credentials - Windows 2000: This logon type 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.

  • Name
  • The Name property defines the label by which the object is known. When subclassed, the Name property can be overridden to be a Key property.

  • StartTime
  • The StartTime property represents the time at which the session started.

  • Status
  • The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are "OK", "Degraded" and "Pred Fail". "Pred Fail" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "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 on-line, yet the managed element is neither "OK" nor in one of the other states.


    Method not found.

    Example WQL

    SELECT * FROM Win32_LogonSession
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...