Fix broken query
This commit is contained in:
parent
a122795f38
commit
fa0a0356a4
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ function New-PersonalUser([Context] $context)
|
||||||
{
|
{
|
||||||
Enable-PersonalUserAutologon $context;
|
Enable-PersonalUserAutologon $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.RegisterReboot();
|
$context.RegisterReboot();
|
||||||
$context.RemoveStage();
|
$context.RemoveStage();
|
||||||
Write-EventLog -LogName Application -Source "Application" -EventId $context.Get($uacDisablerTriggerProperty) -Message "This event was created by $env:Username";
|
Write-EventLog -LogName Application -Source "Application" -EventId $context.Get($uacDisablerTriggerProperty) -Message "This event was created by $env:Username";
|
||||||
|
|
Loading…
Reference in a new issue