No. You have to query every DC in your environment and determine the latest date. If you search around this site and the internet you will find vbscripts that will perform this function.
If you can live with "close", you can query the lastLogonTimestamp attribute of the user account. This attribute is replicated to all DCs, but is only updated once every 7 days.
Oh... I almost forgot to mention... the lastLogon and lastLogonTimestamp attributes are stored in AD in Integer8 format. You can convert it using the W32Tm command or by vbscript.
For your second criteria, the computer on which the user logged in is not recorded. To get that information you need to query the event logs of every PC or write a logging feature into your login script that records which systems users are logging into.
PSC
Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.