ADCleanup is my implementation of a set-and-forget Active Directory cleanup tool. Once this tool is implemented correctly, you never need to worry about dormant accounts ever again.
1) Download and extract ADCleanup.zip (here is VirusTotal scan) to a folder of your choice, saved on the computer on which it will be scheduled to run.
2) Create a location in Active Directory to store inactive user accounts and record the distinguished name (DN).
3) Create a location in Active Directory to store inactive computer accounts and record the distinguished name (DN).
4) Run Configurator.exe (Configurator Editor).
a) On the Encrypt tab, enter the password for the account that will be performing the cleanup task. Encrypt it with key 9hOK7AtlGOCRyBtBdhF9pnTQuk8ES176 and record encrypted password
b) On the Settings tab, enter the fully qualified domain name, cleanup account user name and the encrypted password recorded in step 4a
c) Set userCleanup to true to enable the process to clean up user accounts. Set user cleanup parameters
d) Set userDisabledOUto value recorded in step 2
e) Set computerCleanup to true to enable the process to clean up user accounts. Set computer cleanup parameters
f) Set computerDisabledOU to value recorded in step3
g) On the userExcludedDNs tab, specify any distinguished name of an organizational unit that should be excluded from the cleanup process (+ or INS to add, - or DEL to delete, Enter or double-click to edit)
g) On the computerExcludedDN stab, specify any distinguished name of an organizational unit that should be excluded from the cleanup process (+ or INS to add, - or DEL to delete, Enter or double-click to edit)
h) Schedule ADCleanup.exe to execute via a scheduled task. Upon every execution, the tool will clean up user and computer objects as per your configuration
Using this process, (or one similar) will keep Active Directory clean from the unused computer and user objects, and increases server security in the process.
Please do not forget to press the "Thumb's Up" button if this article was helpful and valuable for EE members.
It also provides me with positive feedback. Thank you!
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (29)
Commented:
Author
Commented:All I am saying it that those scripts are dangerous and I guarantee you that if you go into any medium to large environment, you will break systems
If you posted a Powershell (or any other solution, say oldcmp) that provide basic controls over these parameters, I would not have an issue.
I am not concerned about promoting other solutions, I encourage it.
We are a community
Commented:
Author
Commented:Commented:
I learned alot here people guided me here time to time.
View More