Solved

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

Posted on 2016-09-21
3
65 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy with attributes 2 25
Deploying packaged application using SCCM steps ? 4 37
Ouput in html in powershell 2 19
Migrating Roaming Profiles to new server 5 24
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
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 configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

839 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