Disable local admin during setup
This commit is contained in:
parent
f791ec1eff
commit
fcc02320ea
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ function New-PersonalUser([Context] $context)
|
|||
|
||||
Write-Information "Renaming the new User to $($context.UserName)";
|
||||
Rename-LocalUser $user $context.UserName;
|
||||
Add-LocalGroupMember -Group "Administrators" -Member $user && Set-LocalUser $context.AdminName -Password (ConvertTo-SecureString -AsPlainText "Admin");
|
||||
Add-LocalGroupMember -Group "Administrators" -Member $user && Set-LocalUser $context.AdminName -Password (ConvertTo-SecureString -AsPlainText "Admin") && Disable-LocalUser $context.AdminName;
|
||||
|
||||
Write-Host "Registering setup script for all new users";
|
||||
$context.RegisterNewUserReboot();
|
||||
|
|
Loading…
Reference in a new issue