Link to home
Start Free TrialLog in
Avatar of jasonhdz
jasonhdzFlag for United States of America

asked on

Active Directory Management

Hi there,

I am trying to configure automatic user account expiration in Windows 2008 R2 Active Directory.  I would like i tot use the DSQuery and DSMod commands.  I have piped a DSMod in a DSQuery but syntax is wrong.  I need it to automatic disable user accounts after 90 days of inactivity.  Can someone help?

Thanks in advance.
SOLUTION
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada 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
SOLUTION
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 jasonhdz

ASKER

Thanks everyone.

I basically need the script to be able to check:
1.  The last time users in active directory logged in
2.  If this is more than 60 days, then disable the account.

I dont have a X number of static users, it may increase or decrease significantly. that is why i need it to be able to check all users...maybe on a daily basis.

Thanks.
ASKER CERTIFIED SOLUTION
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