Disable Stale AD Accounts

Well …

Unused accounts are always a little bit of a pain for several (security) reasons, that’s why we should take care of them and that’s why I wrote this script which you can run as a Scheduled Task.

The Script

The script searches for accounts which weren’t used for X days. You can configure if accounts with “Password never expires” set are ignored or not, there is also an exclusion list for accounts which should always be ignored.
Ignored accounts are always logged, for active and new users there is an option to enable/disable logging.
A monthly CSV, holding all by the script disabled accounts, is sent on every first of the following month.

Download “Disable-StaleAccounts” Disable-StaleAccounts.zip – Downloaded 3336 times – 2.68 KB

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.