Fix accessability of variables

This commit is contained in:
Manuel Thalmann 2024-03-24 02:06:16 +01:00
parent b3b99fe422
commit 745157dbc0

View file

@ -13,7 +13,6 @@ function New-PersonalUser([Context] $context, [string] $userName)
$postProcessStage = "ReEnableFeatures"; $postProcessStage = "ReEnableFeatures";
$adminRemovalStage = "RemoveAdmin"; $adminRemovalStage = "RemoveAdmin";
$null = New-Module {
function Get-UserStage() { function Get-UserStage() {
return $context.Get($userStageProperty); return $context.Get($userStageProperty);
} }
@ -22,7 +21,6 @@ function New-PersonalUser([Context] $context, [string] $userName)
param([string]$value); param([string]$value);
$context.Set($userStageProperty, $value); $context.Set($userStageProperty, $value);
} }
}
switch (Get-UserStage) { switch (Get-UserStage) {
{ (-not $_) -or ($_ -eq $creationStage) } { { (-not $_) -or ($_ -eq $creationStage) } {