Link to home
Start Free TrialLog in
Avatar of rsbgroup
rsbgroupFlag for United States of America

asked on

user account expire

We are using Server 2008 Standard R2 64 Bit. Specific OU all user account expire end . Due to that user unable to login. automatic how to find why and resolved this issue. Please find attachment.
Issue.jpg
ASKER CERTIFIED SOLUTION
Avatar of Jaroslav Mraz
Jaroslav Mraz
Flag of Slovakia 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
Fastest way to do this would be to Edit Properties of multiple accounts which reside in the OU.
- Go to the OU where the disabled users are
- Hold ctrl (idividually select) or hold shift (select multiple) users
- Right click one of the users you select > click properties
- Click on the Account Tab
- From here you can set new expire date, unlock the account etc (see screenshot below)...
User generated imageThere are additonal properties you can set that are not viewable in the screenshot above.

You can also do this via powershell as well. Use the below syntax for reference...
import-module activedirectory
Get-ADUser -Filter * -Searchbase "ou=testou,dc=domain,dc=com" -Properties * | Set-ADUser -Enabled $true -AccountExpirationDate "02/28/2014"

Open in new window


The script above will take all users in the "testou" and Enable their account and set the expire date to Feb 28 2014.

Will.
Avatar of compdigit44
compdigit44

I am a bit confused are you asking how all accounts in one OU are set to expire on a specific date or how to set all accounts to expire?
I believe that the user is saying that he has an OU with disabled accounts and needs to have them all re-enabled, based on what i read.

Will.
But this statement "automatic how to find why and resolved this issue" makes me think otherwise though.... ;-)
Yeah I guess it could help if it was worded differently. I guess we just need to see what the asker says :-D

Will.
If these accounts are getting disabled there are only three ways for it to happen..

his is not a default Microsoft Active Directory Domain Services behavior. Below are the only possibilities for the accounts being locked

a) Manual disabling of User account or User accounts

b) Schedule Task which triggers a Script to disable the User account / User accounts

b) Manual execution of WMI Script / Powershell Script to disable the User account or User accounts

https://support.microsoft.com/kb/2777063

Also any group policy changes lately