Ensure only one user is enabled at once
This commit is contained in:
parent
caffde0a01
commit
95b0f0994e
1 changed files with 5 additions and 0 deletions
|
@ -453,6 +453,7 @@ $null = New-Module {
|
||||||
}
|
}
|
||||||
([UserStage]::Cleanup) {
|
([UserStage]::Cleanup) {
|
||||||
$user = Get-SetupUser;
|
$user = Get-SetupUser;
|
||||||
|
Disable-LocalUser $name;
|
||||||
Enable-LocalUser $user;
|
Enable-LocalUser $user;
|
||||||
Set-AutologinUser $user;
|
Set-AutologinUser $user;
|
||||||
Unregister-WslDistribution;
|
Unregister-WslDistribution;
|
||||||
|
@ -464,6 +465,10 @@ $null = New-Module {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($user in $users) {
|
||||||
|
Enable-LocalUser $user;
|
||||||
|
}
|
||||||
|
|
||||||
Set-IsFinished $true;
|
Set-IsFinished $true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue