Allow automatic script execution for MS accounts
This commit is contained in:
parent
c789bd6c72
commit
a460608b10
|
@ -5,6 +5,7 @@ using namespace System.Security.Principal;
|
||||||
|
|
||||||
. "$PSScriptRoot/Manage.ps1";
|
. "$PSScriptRoot/Manage.ps1";
|
||||||
. "$PSScriptRoot/User/Install.ps1";
|
. "$PSScriptRoot/User/Install.ps1";
|
||||||
|
. "$PSScriptRoot/../Scripts/Security.ps1";
|
||||||
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
|
. "$PSScriptRoot/../Software/Firefox/Install.ps1";
|
||||||
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
|
. "$PSScriptRoot/../../Common/Scripts/Context.ps1";
|
||||||
|
|
||||||
|
@ -465,13 +466,14 @@ $null = New-Module {
|
||||||
Enable-LocalUser $user;
|
Enable-LocalUser $user;
|
||||||
|
|
||||||
if (Get-UserConfig -UserName "$user" -Name "microsoftAccount") {
|
if (Get-UserConfig -UserName "$user" -Name "microsoftAccount") {
|
||||||
|
Enable-UAC;
|
||||||
Disable-Autologin;
|
Disable-Autologin;
|
||||||
Set-BootMessage -Caption "Login" -Message "Please login using your account.";
|
Set-BootMessage -Caption "Login" -Message "Please login using your account.";
|
||||||
} else {
|
} else {
|
||||||
Set-AutologinUser "$user";
|
Set-AutologinUser "$user";
|
||||||
}
|
}
|
||||||
|
|
||||||
Restart-Intermediate
|
Restart-Intermediate -DefaultUser;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue