• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

domain auto disable

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
pma111
Asked:
pma111
2 Solutions
 
Manjunath SulladTechnical ConsultantCommented:
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
 
gurutcCommented:
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now