Get Computername for a Specific User

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

How can I determine the specific Computername that a User is logged on to,
given only the Username/ID account? I know several ways to easily determine
who the Username/ID is logged on to any given computer, but can't figure out
the other way around. I need to determine which Computername (among
hundreds) that User Jane Smith is logged in to. This capability does not
appear possible on a Microsoft AD Network via MMC, command line methods, nor
the other WinXP OS system tools. I would prefer to incorporate a command
line method into a batchfile script; a Visual Basic script or PowerShell
script would also fit my needs; or a third-party (executable) utility. I
don't want to run an 'install' onto all the hundreds of computers, although
copying a single file to the computers and then executing it remotely is
okay. I want the resulting User's Computername to be written to a simple
text file on a network path or onto my PC, and optionally displayed on my
screen. All scripts/methods are welcomed. Thanks in advance for help.
Microsoft should add this network administration/management capability to
the MS Network and/or PC OS system tools.
 
Dennis said:
How can I determine the specific Computername that a User is logged on to,
given only the Username/ID account? I know several ways to easily determine
who the Username/ID is logged on to any given computer, but can't figure out
the other way around. I need to determine which Computername (among
hundreds) that User Jane Smith is logged in to. This capability does not
appear possible on a Microsoft AD Network via MMC, command line methods, nor
the other WinXP OS system tools. I would prefer to incorporate a command
line method into a batchfile script; a Visual Basic script or PowerShell
script would also fit my needs; or a third-party (executable) utility. I
don't want to run an 'install' onto all the hundreds of computers, although
copying a single file to the computers and then executing it remotely is
okay. I want the resulting User's Computername to be written to a simple
text file on a network path or onto my PC, and optionally displayed on my
screen. All scripts/methods are welcomed. Thanks in advance for help.
Microsoft should add this network administration/management capability to
the MS Network and/or PC OS system tools.
I put a line in the login.bat:

REM record logons by computer name - lots of files but no contention problems.
echo logon %date% %time% %UserName% >>
\\server\share\netlog\log%ComputerName%.txt

and a similar one in logoff.bat to record logoff time.

My system is organised by computer name, yours will be organised by account
name.
Viewing the directory by 'Last updated' will tell you who isn't at work today.
 
NET SESSIONS in a cmd prompt on the master server will give this info. You
should be able to redirect this output to a file ( >file.txt) and parse it
witha simple program to get what you want.
 
Back
Top