Rename user stages

This commit is contained in:
Manuel Thalmann 2024-03-23 15:54:15 +01:00
parent 7c1befdef4
commit 6d02e1bcb9

View file

@ -10,7 +10,7 @@ function New-PersonalUser([Context] $context, [string] $userName)
{
$userStageProperty = "UserStage";
$creationStage = "Create";
$disableUACStage = "DisableUAC";
$postProcessStage = "ReEnableFeatures";
$adminRemovalStage = "RemoveAdmin";
$null = New-Module {
@ -65,12 +65,12 @@ function New-PersonalUser([Context] $context, [string] $userName)
Write-Host "Registering setup script for all new users";
$context.RegisterNewUserReboot();
Register-UserPostprocessingTasks $context;
Set-UserStage $disableUACStage;
Set-UserStage $postProcessStage;
Restart-Computer -Force;
exit;
}
}
$disableUACStage {
$postProcessStage {
Enable-PersonalUserAutologon $context $userName;
$context.RegisterReboot();
Set-UserStage $adminRemovalStage;