strcomputer = "."
objwmiservice = getobject("winmgmts:{impersonationLevel=impersonate}!\\" || strcomputer || "\root\cimv2")
colitems = objwmiservice~execquery("Select * from Win32_LogonSession")
DO objitem OVER colitems
SAY "Authentication Package:" objitem~authenticationpackage
SAY "Logon ID:" objitem~logonid
SAY "Logon Type:" objitem~logontype
SAY "Start Time:" objitem~starttime
SAY
END |