How to modify AD account control using PowerShell scripts.
Steps to modify AD account control using PowerShell:
- Identify the domain in which you want to manage settings of users
- Identify the LDAP attributes you need modify.
- Compile the script.
- Execute it in Windows PowerShell.
Sample Windows PowerShell script
Click to copy entire script
Set-ADAccountControl -Identity ScottJohn -PasswordNeverExpires $True
How to modify AD computers in bulk:
- Select Reset Password -> User Management -> Management.
- Select the domain and OU.
- Choose the desired user(s), select Yes for Password Never Expires and select Apply.
» Start 30-day Free Trial
Following are the limitations to modify AD account control settings using native tools like Windows PowerShell:
- We can run this script only from the computers which has Active Directory Domain Services role.
- With additional filters, the script will get longer and complicated.
- Troubleshooting these scripts requires extensive AD and scripting expertise
ADManager Plus can help you modify AD account control settings in bulk with just a CSV file in a simple and intuitively designed UI.
Manage AD user settings in bulk with ADManager Plus.
Get 30-day free trial.