eneerge / CIS-Windows-Server-2022

33 stars 24 forks source link

Changes to Guest/Admin check and setting passwords #7

Closed SwaffelSmurf closed 1 year ago

SwaffelSmurf commented 1 year ago

Moved the Admin/Guest user check to the beginning of the script, where the new users are randomized. When rerunning the script on a system that's already hardened, the SetUserRight function fails because it uses new randomized accounts as input.

Modified the ValidatePasswords function and if statements to save passwords as a secure string.