Solved

Need to script a password reset for multiple users in the same OU in Active Directory

Posted on 2016-09-21
3
69 Views
Last Modified: 2016-09-21
I have a test AD OU and I need to reset a select number of users to the same password.  Was hoping to get some help with some type of PowerShell command or tool to facilitate this.  Any help would be greatly appreciated.
0
Comment
Question by:SDISupport
3 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 250 total points
ID: 41809684
I need to reset a select number of users to the same password
If you have a list of user names in a text file..
Import-Module Activedirectory
GC C:\input.txt | %{Set-ADAccountPassword $_ -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd" -Force)}

Open in new window

Sample input file
UserA
UserB
UserC

Open in new window

0
 
LVL 54

Assisted Solution

by:McKnife
McKnife earned 250 total points
ID: 41809777
The shortest way, as usual, is batch: http://www.petenetlive.com/KB/Article/0000497
Powershell script right from the MS script gallery: https://gallery.technet.microsoft.com/scriptcenter/Reset-password-for-all-412fbc72
0
 
LVL 2

Expert Comment

by:Nilesh Kamble
ID: 41810121
article
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question