community.cognetic.com

Support Topics => Microsoft => Windows Server => Topic started by: bflores on July 20, 2012, 04:05:36 PM

Title: How to change everyone's passwords via Powershell script
Post by: bflores on July 20, 2012, 04:05:36 PM
(HOW TO CHANGE EVERYONE'S  PASSWORDS)
Run the below from a Windows Powershell to change all passwords. Change the query to match your path.  Change NEWPASSWORD to the password you want.

To test the DSQuery path is pulling the users correctly:
DSQUERY user "OU=users,DC=cognetic,DC=com"

To change the passwords and set must change password to no:
DSQUERY user "OU=users,DC=cognetic,DC=com" | dsmod user -pwd NEWPASSWORD -mustchpwd no