Disable and remove inactive accounts in Active Directory

Quite a few companies don’t have proper account management software to maintain their users in Active Directory . Accounts that remain active while the employees already left the company can be a security risk. This little script will disable and remove inactive accounts. The script performs the following actions:– Disable accounts that have not been…

Use the Active Directory PowerShell module without installing RSAT

During the creation of a new custom Azure Devops extension for one of my customers, I bumped into the challenge of querying Active Directory. This had to be done on any of the many build servers, but installing Remote Server Administration Tools (RSAT) on every build server was not an option. Therefore the AD PowerShell…