Asked by:
Script to change local user passwords on the server

Question
-
I created a power shell script which is able to update the password of a single user but not multiple users. Also, I cannot have a script prompting me for password as that would make the automation futile. If someone can guide, I shall be very thankful.
- Edited by thelearner86 Tuesday, April 3, 2018 2:16 AM
- Moved by Bill_Stewart Wednesday, May 30, 2018 6:44 PM This is not "scripts on demand"
Wednesday, March 28, 2018 2:35 AM
All replies
-
Please read this first: This forum is for scripting questions rather than script requests.
Also find scripts here: PowerShell Gallery or here: TechNet Gallery - resources for IT professionals.
Learn PowerShell: Microsoft Virtual Academy - Getting Started with Microsoft PowerShell.
Script requests: Microsoft Technet Script Center - Requests.
Did you even try to search for it? Script to change local user passwords on the server
Best regards,
(79,108,97,102|%{[char]$_})-join''
Wednesday, March 28, 2018 6:37 AM -
You did not even show one single piece of the effort you did to achive what you need. There are scripts in the script center created for what you asked.
You might start with learning the very basics of Powershell. Most of what you need for your task you will learn in the first few hours then.
Best regards,
(79,108,97,102|%{[char]$_})-join''
Wednesday, March 28, 2018 7:15 AM -
Yes, that is possible.
I would take this script https://gallery.technet.microsoft.com/scriptcenter/66a5b38f-cdf1-4126-aa0c-be65e16dd650 and adjust it to your needs (get rid of the credential prompt).
Wednesday, March 28, 2018 7:19 AM -
You might explain him how you found that! :-/
Best regards,
(79,108,97,102|%{[char]$_})-join''
Wednesday, March 28, 2018 7:22 AM -
Thanks Toby. Really grateful.
- Edited by thelearner86 Thursday, March 29, 2018 4:04 AM
Wednesday, March 28, 2018 7:54 AM -
This is not a free script customization forum. It you do not know how to write a script then you ned to take a tutorial and learn PowerShell. If you cannot read or learn then you will need to contact a consultant to help you with this.
\_(ツ)_/
Wednesday, March 28, 2018 8:10 AM -
You will not be able to understand anything until you sit down and learn basic PowerShell and computer programming. Without fundamental knowledge you will be lost.
We cannot give you personal lessons in PS. The Gallery has more scripts that do what you want. You haven't even tried to look for them.
\_(ツ)_/
Wednesday, March 28, 2018 8:43 AM -
No. The issue is you do not have enough technical training in Windows to understand the complexity of the question you are asking. You have a bout a dozen issues to solve in order to do what you ask.
If you change all user account passwords on a Windows system the system and, possibly, other subsystems will stop working.
You need to pick a script that changes one user account on one computer. You then need a file or other source of accounts, passwords and computers. Next you will need to loop through this source of data and call the password function/CmdLet once for each line.
I suggest starting by learning how to read a file in a loop. This is usually learned in the first couple of chapters of a book or I n the first couple of hours of a tutorial.
Start by learning each piece until you have all of the parts.
That is as far as I will go with personal training since there are ample resources for you to learn these things on your own. If you are just asking for someone to do all of this for you then you can post here: Script requests. Someone in that forum will write a script for you if they like the projecr.
You can also search for blog articles that will show you how to bulk change passwords.
https://gallery.technet.microsoft.com/scriptcenter/Reset-password-for-all-412fbc72
Here are a dozen more bulk password scripts: https://www.google.com/search?newwindow=1&source=hp&ei=blu7WsiNOeq2ggeWvpyYCw&q=powershell+bulk+change+local+passwords&oq=powershell+bulk+change+local+passwords&gs_l=psy-ab.3..33i22i29i30k1l8.730.12392.0.12973.39.38.0.0.0.0.159.3616.27j11.38.0....0...1.1.64.psy-ab..1.38.3608.0..0j0i131k1j0i22i30k1.0.w_IE7zUyXZE
\_(ツ)_/
Wednesday, March 28, 2018 9:10 AM -
I was being kind when I noted that you need to first learn the technology you are asking about.
It is clear you have no intention of learning PowerShell and are just trying to get a free script.
I will leave you to uyour own devices. The answer you seek ahs been posted above in more than one link. We cannot help you to understand what you are not trained for,
Sorry. I will leave this to you. I cannot make you think, read or learn.
\_(ツ)_/
- Edited by jrv Wednesday, March 28, 2018 9:26 AM
Wednesday, March 28, 2018 9:25 AM