wveagle81 has asked for the wisdom of the Perl Monks concerning the following question:
Using the Win32::OLE module, how would one get the currently logged in Windows user?
I found some information online, but it's mostly for VB users. I can use code I found
(looking at the Win32_LogonSession where LogonType=2) to get some information, but it's not
exactly what I want. I need the actual user name (not a number) and when their session
started.
Any help would be appreciated. I'm running this against Windows 7 workstations.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Query current logged in Windows user via WMI
by VinsWorldcom (Prior) on Jun 04, 2013 at 19:45 UTC | |
by VinsWorldcom (Prior) on Jun 04, 2013 at 20:10 UTC | |
by wveagle81 (Novice) on Jun 04, 2013 at 19:54 UTC | |
|
Re: Query current logged in Windows user via WMI
by wveagle81 (Novice) on Jun 04, 2013 at 19:11 UTC | |
|
Re: Query current logged in Windows user via WMI
by Anonymous Monk on Jun 04, 2013 at 22:31 UTC |