Remove stage reference after removing admin account
This commit is contained in:
parent
55d6d92b0b
commit
57f4ffd0e4
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ function New-PersonalUser([Context] $context)
|
||||||
{
|
{
|
||||||
Write-Information "Removing Admin Account";
|
Write-Information "Removing Admin Account";
|
||||||
Get-CimInstance -ClassName "Win32_UserProfile" -Filter "SID = '$((Get-LocalUser $context.AdminName).SID)'" | Remove-CimInstance;
|
Get-CimInstance -ClassName "Win32_UserProfile" -Filter "SID = '$((Get-LocalUser $context.AdminName).SID)'" | Remove-CimInstance;
|
||||||
|
$context.RemoveStage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue