Geek.Like.Todd

Stupid Powershell Tricks: Changing the Password of all User’s in an OU with AD Module for Powershell —

In my opinion MS makes 2 Good things, Active Directory, and Exchange, and I use both.

Recently I had a need to change passwords for alot of user’s in a certain organization, it didn’t matter what the password was, only that it needed to be different now.

So.. I opened up Active Directory Module for Windows Powershell, and I typed out this:

Let’s say my users are in this OU in AD.

domain.mycompany.com\Users\Company3

DSQuery user "OU=Company3, OU=Users, DC=domain, DC=mycompany, DC=com" -limit 0 | DSMOD user -pwd Password01$$

This would set the Passwords to Password01$$

Keep in mind it will change the password of every user in that OU.

 


0

Categorised as: Active Directory | Stupid Powershell Tricks



Leave a Reply

Your email address will not be published. Required fields are marked *