[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1193
  • Last Modified:

Logged on workstation

I urgerntly need a way to tell which workstation a user is logged on to... This might be a script or a tool.

Thanks in advance.
0
Stevolee
Asked:
Stevolee
  • 4
  • 3
  • 2
  • +2
3 Solutions
 
Ron MalmsteadInformation Services ManagerCommented:
This is a quick and easy way to find out...
If you have users who all have a common drive mapping to a server share... you can use MMC Computer Management to see who and what is connected.

See screenshot...

The other alternative is to use a logon script to log user's logon actions...
Example....
ECHO %username% logged on to %computername% at %DATE% >> \\Server\share\Logons.txt

Then, you can import this file into MSACCESS and run queries, or simply open it in excel or notepad and search it.
UserSessions.bmp
0
 
Ron MalmsteadInformation Services ManagerCommented:
Sorry,...didnt see the "vbscript/Powershell"...

If you are using vb script, you could also parse or do a "find", on that logon.txt file, for specific user and return the line.
0
 
MidnightOneCommented:
Grab the pstools kit from Microsoft (http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx). Using PsLoggedOn and a domain admin-level account, you can see everywhere a user is logged into, thus:

psloggedon username -d domainname >>C:\WhoWhere.txt
Where username is the user's logon name and domainname is the name of the domain you want to search. It'll drop all output to the command prompt window, so i've added the redirect to the file WhoWhere.txt on the root of your C: drive.

Enjoy!
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Ron MalmsteadInformation Services ManagerCommented:
Good one MidnightOne:.... I had forgotten about pstools.
0
 
MidnightOneCommented:
It's all about the toys. :-)
0
 
StevoleeAuthor Commented:
Tried the tool it's going to each server... we have over 1000 servers and about 10k desktops this will take forever!
There is an object in ad, that grabs that information some how, I have seen it in the past. Once you logon to ad it picks the workstation as well...
0
 
MidnightOneCommented:
Sounds liek you're looking for LogParser (http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en)

It's been a while since I've used it, but if I'm remembering correctly, you can filter what it retrieves by username and run it against only the domain controllers in your enterprise.
0
 
Ron MalmsteadInformation Services ManagerCommented:
No matter how you look at it...

Performing a WMI query on Event logs, or on actual machines would be a very slow process in large network.

I would suggest using the logon script method
ECHO %username%,%computername%,%DATE% >> \\Server\share\Logons.txt

Then parse the logons.txt file in a script....

.... OR... you could write a vbs script to log user logon's / logoff's to an sql table... and query that.

That would be much faster.
0
 
Psy053Commented:
To my knowledge, there are no attributes within AD that contain the information you require, having something like that in AD would results in massive amounts of useless data being replicated around your environment.

I wrote a script for someone not long ago that pulls a list of all workstations from AD, checks that list for available computers, then does a WMI query to find where the user is logged on to.

It will take some time to complete, however, you can create multiple copies of the script, and point each one to a separate OU and run them at the same time.

If you are interested, please see Comment 25716515, in the following question:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24787821.html
0
 
LearnctxEngineerCommented:
You can write a function into your logon scripts to record the computer name a user is logging into. Does your logon script do any kind of logging (writing to a central share or the users home directory)?
0
 
StevoleeAuthor Commented:
Not exactly what I am looking for...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now