Link to home
Start Free TrialLog in
Avatar of Neptune IT
Neptune ITFlag for United States of America

asked on

Need help with scripting

Hi,
Can someone tell me script to get all the computer names in AD  in specific OU with Last logon date.
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Klavs R
Klavs R

How accurate data you need?
If you need to locate stale computers then lastlogontimestamp is good enough.
But for more precise data you need to use lastlogon and since it is not replicated field, you need to iterate all your domain controllers to get the most recent value.