Rename user stages
This commit is contained in:
parent
7c1befdef4
commit
6d02e1bcb9
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ function New-PersonalUser([Context] $context, [string] $userName)
|
||||||
{
|
{
|
||||||
$userStageProperty = "UserStage";
|
$userStageProperty = "UserStage";
|
||||||
$creationStage = "Create";
|
$creationStage = "Create";
|
||||||
$disableUACStage = "DisableUAC";
|
$postProcessStage = "ReEnableFeatures";
|
||||||
$adminRemovalStage = "RemoveAdmin";
|
$adminRemovalStage = "RemoveAdmin";
|
||||||
|
|
||||||
$null = New-Module {
|
$null = New-Module {
|
||||||
|
@ -65,12 +65,12 @@ function New-PersonalUser([Context] $context, [string] $userName)
|
||||||
Write-Host "Registering setup script for all new users";
|
Write-Host "Registering setup script for all new users";
|
||||||
$context.RegisterNewUserReboot();
|
$context.RegisterNewUserReboot();
|
||||||
Register-UserPostprocessingTasks $context;
|
Register-UserPostprocessingTasks $context;
|
||||||
Set-UserStage $disableUACStage;
|
Set-UserStage $postProcessStage;
|
||||||
Restart-Computer -Force;
|
Restart-Computer -Force;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$disableUACStage {
|
$postProcessStage {
|
||||||
Enable-PersonalUserAutologon $context $userName;
|
Enable-PersonalUserAutologon $context $userName;
|
||||||
$context.RegisterReboot();
|
$context.RegisterReboot();
|
||||||
Set-UserStage $adminRemovalStage;
|
Set-UserStage $adminRemovalStage;
|
||||||
|
|
Loading…
Reference in a new issue