How to set a password for an AD Account using PowerShell
The following is a comparison between setting a password for user accounts in AD with Windows PowerShell and ADManager Plus:
Steps to set a password for an AD account using PowerShell:
- Identify the domain in which you want to move the objects(s)
- 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-ADAccountPassword -Identity 'CN=John Scott,OU=Accounts,DC=ABCCompany,DC=com' -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "pa$sw0rd" -Force)
To move AD users to another OU:
- Select Reset Password -> User Management -> Management.
- Select the domain and OU.
- Choose the desired user(s), enter the new password and select Apply.
» Start 30-day Free Trial
Following are the limitations to modify AD user(s)’s password 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 reset users’ passwords in bulk with just a CSV file in a simple and intuitively designed UI.