Author Topic: How to change everyone's passwords via Powershell script  (Read 7246 times)

bflores

  • Administrator
  • Jr. Member
  • *****
  • Posts: 75
    • View Profile
How to change everyone's passwords via Powershell script
« 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