TIP: Anyone who wants to write scripts for Active Directory will eventually run into the famous userAccountControl attribute. The good news is that in PowerShell we have two cmdlets that make this easy: Set-ADAccountControl and Search-ADAccount.