Re-enable RunOnce creation for new users

This commit is contained in:
Manuel Thalmann 2023-06-29 15:05:06 +02:00
parent 858679a36a
commit 0137fd56f3

View file

@ -34,6 +34,9 @@ function New-PersonalUser([Context] $context)
Rename-LocalUser $user $context.UserName;
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();
Write-Information "Enabling UAC for the next login (Microsoft Account login won't work otherwise, lol)";
Enable-UACNextLogin $context;