cschneegans/unattend-generator

request - set administrator account

Closed this issue · 1 comments

Would it be possible to add an option in the user accounts section to set a password for the built in administrator account (without enabling it) in addition to creating other users.

This should probably be done with a custom script. Try using a .cmd script in the Scripts to run in the system context section:

net.exe user Administrator YourPassword

Note that custom scripts are stored in C:\Windows\Setup\Scripts, so that password will be easily readable. With a .ps1 script, you could also prompt for a password interactively, like so:

net.exe user Administrator ( Read-Host -Prompt "Enter password for built-in Administrator account" )

I have not tested any of these scripts, and there may be unintended side effects.