Get Computername for a Specific User

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.
 
N

Newell White

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.
 
A

Anteaus

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top