Im in a somewhat unique situation.
I am trying to create a windows user, using the command line or a batch file. I know how to do that in the basic case:
net user username password /add
The problem is that i am doing this through an endpoint management system, which will log (publicly) whatever command line i am running, so if the password is written in the command line it would be visible to all.
I do have a temporary file that contains a file, so if i could get the
net user command to read the password from a file, i could get around this logging issue.
The best I've come up with is:
type password.txt | net user username * /add
Which acts like it works, except that the password is always blank.