Fix accessability of variables
This commit is contained in:
parent
b3b99fe422
commit
745157dbc0
1 changed files with 6 additions and 8 deletions
|
@ -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) } {
|
||||||
|
|
Loading…
Reference in a new issue