By using this site, you agree to the Privacy Policy.
Accept
EnterinITEnterinITEnterinIT
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Reading: PowerShell Reset Password for all Users in an Active Directory OU
Font ResizerAa
EnterinITEnterinIT
Font ResizerAa
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
  • WINDOWS
  • SCCM Query Collection List
Search
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
IT Pro

PowerShell Reset Password for all Users in an Active Directory OU

Published: February 18, 2024
1 Min Read
SHARE

PowerShell Reset Password for all Users in an Active Directory OU. To reset the password for all the users in an OU, you can follow one of these ways.

1. The easiest way is to use DSQUERY (Not work for me)

Get the list of users in a specific OU and pipe the result to DSMOD for changing the password.

The command is:

DSQUERY user "OU=name_ou,DC=domain,DC=com" -limit 0 | DSMOD user -pwd "new_pass"

NOTE: You just need to change the name of OU and DC with the Distinguished Name of the OU in your ActiveDirectory that contains the users.

2. Using Get-ADUser (Work perfectly for me)

To get all the users in a specific OU and send them to Set-ADAccountPassword for password change.

Here is the command:

Get-ADUser -Filter * -SearchScope Subtree -SearchBase "OU=ou_name,DC=domain,DC=loc" | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "new_pass" -Force)

NOTE: You just need to change the name of OU and DC with the Distinguished Name of the OU in your ActiveDirectory that contains the users.

TAGGED:Active DirectoryPowerShell
Previous Article Configuration Manager Query Collection List Configuration Manager Error 0x80246002
Next Article Microsoft Teams Roundup July 2019
1 Comment 1 Comment
  • AD User says:
    October 28, 2020 at 6:25 am

    Good article Shared to Reset all user passwords in OU. This article really helps a lot

    How we can Enable or Disable AD User using Powershell.

    Thanks for sharing this article

    Reply

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translation

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
by Transposh - translation plugin for wordpress

Popular Posts

System Requirements for Windows Server 2016
Windows Server
Configuration Manager Query Collection List
Configuration Manager Query Collection List
ConfigMgr
Structured/Managed Navigation enabled on Modern Pages in Classic Team Sites
Tech
SCCM Failed to get DP locations as the expected version from MP
ConfigMgr

Recent Posts

Installing and Configuring Fail2ban for SSH Protection on Ubuntu 24.04
Linux
Enabling and Configuring FirewallD on AlmaLinux
Linux
User Creation and SSH Key Setup in AlmaLinux
Linux
How to reset password on AlmaLinux
Linux

© 2023 EnterinIT

Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?