As long as at least one token exists with a given logon session LUID, Windows considers the logon session to be active. You can use the LogonSessions tool from Sysinternals, which uses the
Information reported for a session includes the SID and name of the user associated with the session, as well as the session’s authentication package and logon time. Note that the Negotiate authentication package, seen in logon session 2 in the preceding output, will attempt to authenticate via Kerberos or NTLM, depending on which is most appropriate for the authentication request.
The LUID for a session is displayed on the “Logon Session” line of each session block, and using the Handle utility (also from Sysinternals), you can find the tokens that represent a particular logon session. For example, to find the tokens for logon session 5 in the example output just shown, you could enter this command:C:\Windows\system32>handle -a 882c2 Handle v3.46 Copyright (C) 1997-2011 Mark Russinovich Sysinternals - www.sysinternals.com System pid: 4 type: Directory D60: \Sessions\0\DosDevices\00000000-000882c2 winlogon.exe pid: 440 type: Event DC: \BaseNamedObjects\00000000000882c2_WlballoonSmartCardUnlockNotificationEventName winlogon.exe pid: 440 type: Event E4: \BaseNamedObjects\00000000000882c2_WlballoonKerberosNotificationEventName winlogon.exe pid: 440 type: Event 1D4: \BaseNamedObjects\00000000000882c2_WlballoonAlternateCredsNotificationEventName lsass.exe pid: 492 type: Token 508: LAPT8\jeh:882c2 lsass.exe pid: 492 type: Token 634: LAPT8\jeh:882c2 svchost.exe pid: 892 type: Token 7C4: LAPT8\jeh:882c2 svchost.exe pid: 960 type: Token E70: LAPT8\jeh:882c2 svchost.exe pid: 960 type: Token 1034: LAPT8\jeh:882c2 svchost.exe pid: 960 type: Token 1194: LAPT8\jeh:882c2 svchost.exe pid: 960 type: Token 1384: LAPT8\jeh:882c2