Solved

Which AD user is logged on a AD computer?

Posted on 2011-03-23
4
726 Views
Last Modified: 2012-05-11
Hello,

I have a Windows 2003 simple Domain -
Is there a query that gives you list of computers, telling which user is logged on each computer?

Thanks!

Lucia
0
Comment
Question by:lucia570
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 250 total points
ID: 35199779
Unfortunately not that I know of.  No attribute in AD that will list what use is logged on a computer.  You could look at a tool from Microsoft called psloggedon  http://technet.microsoft.com/en-us/sysinternals/bb897545

You could also look at using a simple login script like this  http://msmvps.com/blogs/kwsupport/archive/2005/02/24/36942.aspx

Thanks

Mike
0
 
LVL 5

Expert Comment

by:drilus
ID: 35199822
Yes. You can query WMI's Win32_ComputerSystem and read "Username". That will give you the currently logged on user.
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 35199865
nice trick, not an AD attribute but going out to the machine itself.
0
 
LVL 7

Expert Comment

by:chris_martin62
ID: 35199978
this is a logoff script that one of our Techs found or created it may be helpful. It tells you who the last user was on the computer. It puts the user name in the managed by name field in the computer details in AD. If you have any questions please let me know.
Set objSysInfo = CreateObject("ADSystemInfo") 
Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName) 
 
objComputer.Put "managedBy", objSysInfo.Username 
objComputer.SetInfo

Open in new window

0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question