Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

[Solved] Simple .cmd-script to change windows administrator password on local machines (Windows 7)

$
0
0

Hi!

I want to use a .cmd file with the "net user [username] [password]" command to set a Windows administrator password. I want the password to be picked up from a .txt file, depending on the computers host name.

For example, if I run the .cmd file on a computer named "computer004", it will use "Password04" from a .txt file looking something like this:

------------------------------------------------------------------------
computer001,Password01
computer002,Password02
computer003,Password03
computer004,Password04
computer005,Password05
------------------------------------------------------------------------

Is there any way this can be done?

Thanks!

-Joakim



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>