Solved

domain auto disable

Posted on 2014-03-24
2
210 Views
Last Modified: 2014-03-25
Is there an easy way of disabling all domain accounts after 60 days of inactivity (i.e. not logged in)? I appreciate passwords expire (dependant on policy after a predefined number of days, however they arent truly locked as it just prompts a user for a fresh password).

Can you forsee any issues in applying such a policy?
0
Comment
Question by:pma111
2 Comments
 
LVL 11

Accepted Solution

by:
Manjunath Sullad earned 250 total points
ID: 39949851
Using Powershell script you can achieve your requirement,

Script : http://gallery.technet.microsoft.com/scriptcenter/83d39949-3e22-45ef-aaba-3a4e17341c5e


If you want to make it scheduled activity, You can configure in Scheduled task,



- Manjunath Sullad
0
 
LVL 16

Assisted Solution

by:gurutc
gurutc earned 250 total points
ID: 39950062
We use the exact script as recommended above with great success.

Not looking for points, just agreeing.

We modify it to set the search to start in OUs that contain actual-people user-objects.  We also have service accounts that exceed our 30 day limit that we don't want to disable due to inactivity so we put them in other OUs not subject to our script.

- gurutc
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

837 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