Wednesday, February 12, 2014

Finding Disabled User Accounts on Active Directory

For working purposes I needed to find all user accounts disabled on our domain and move them to a different Organizational Unit (OU).

To do that without scripting and simply using MMC, follow this tips:

  • Open your MMC
  • Navigate to Active Directory Users and Computers
  • Select View -> Filter Options
  • Then select Create Custom Filter and click Customize
  • Select the tab Advanced
  • For the LDAP query, type useraccountcontrol:1.2.840.113556.1.4.803:=2

  • Click OK and OK again
The MMC will refresh and now for every OU with user accounts (objects) you'll only see the Disabled User Accounts.
To disable the filter just click agar in View -> Filter Options and select the option "Show all types of objects"

1 comment: