- May 27, 2020
- Posted by: Syed Shujaat
- Category: Uncategorized
No Comments
Change Bulk Windows Passwords
Many accounts in your AD might need a password change. What if you want to do this in bulk?
I normally use the following script to change bulk usernames and passwords by jotting all usernames them together in 1 single file. Get CN names and repace it with $username .
Set-ADAccountPassword -Identity ‘CN=$username,OU=A ,OU=Portal,DC=ABC,DC=$Domain,DC=com’ -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “p@ssw0rd” -Force)
I also use the following for a quick password reset
Change Windows password for a domain user
- Run Command Prompt as an administrator, or start Windows 10 in safe mode with Command Prompt at the login screen.
- Type
net user /domain USERNAME NEWPASS
. Replace USERNAME and NEWPASS with the actual username and a new password for this user. - If the actual username consists of more than two words, place it inside quotation marks.
- Hit Enter.
Change Windows password for a domain user with PowerShell
- Run PowerShell as an administrator.
- Use the Set-ADAccountPassword cmdlet to change the user’s password:
Set-ADAccountPassword -Identity $user -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "$newPass" -Force)
Replace $user and $newPass with the actual username and a new password. - Hit Enter.