Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I tell what workstation users are logged onto

Status
Not open for further replies.

goecs

Technical User
Aug 8, 2001
13
US
Anyone know how to determine the workstation names that users are loged onto? I have 400 users, and I need to know the workstation names they are logged onto. server manager tells me, but I need something I can run at the command prompt.

Thanks, Chris.
 
We run a batch file a bit similar to this....

date /T >> \\*server*\*directory*\%COMPUTERNAME%.log
time /T >> \\*server*\*directory*\%COMPUTERNAME%.log
echo %USERNAME% >> \\*server*\*directory*\%COMPUTERNAME%.log
echo "====================== " >> \\*server*\*directory*\%COMPUTERNAME%.log

For what you want to do just juxtapose the %computername% and %username% and you'll get a whole bunch of text files in a directory showing when and where the users have logged on.

Hope that's useful....
 
Cerati,
I doesn't seem to work.
What utility do I run with this? and do I need to replace servername with the pdc?

Will you provide more details.

Thanks.
 
It basically runs as a part of the login script, drop it into there and it should work fine - there's nothing unusual about our setup.

*server* and *directory* were just to protect our innocence :)

Replace them with the name of your server and the directory you want them to go into.
 
Try running "hostname", which will return the name of the local box the user is logged onto.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top