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,15 +13,13 @@ 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); }
}
function Set-UserStage() { function Set-UserStage() {
param([string]$value); param([string]$value);
$context.Set($userStageProperty, $value); $context.Set($userStageProperty, $value);
}
} }
switch (Get-UserStage) { switch (Get-UserStage) {