Change password for all my users in AD

Hi Everyone ,within 5 days I want all my users to be forced to change their passwords.

Where in AD can I do this.

I'm using Server 2008R2 domain contoller with Server 2012 R2 domain controller.

Many Thanks
Dirkie LaubscherNetwork adminAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Toni UranjekConsultant/TrainerCommented:
This should do it:

dsquery user “dc=mydomain,dc=local” -limit 0 | dsmod user -mustchpwd

Open in new window

Dirkie LaubscherNetwork adminAuthor Commented:
Hi Toni just want to make sure can I also run this command Get-ADUser -Filter "*" | Set-ADUser -ChangePasswordAtLogon $true ,also I want all users to change their password on Monday when they login will -limit 0 do this for me.

Many Thanks
Toni UranjekConsultant/TrainerCommented:
Yes, that is the PS version of it. "-limit 0" is DSTools special switch to display all entries. If not used, it will list only first 100 entries.

Are you sure, you want to force password change for ALL users? Don't you have any service accounts?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dirkie LaubscherNetwork adminAuthor Commented:
Thanks for the advice Tony ,Will do OU by OU when I change the passwords for the user also can I exclude my SERVER OU with all admin accounts from the Default domain policy.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.