Fix typo
This commit is contained in:
parent
0806391cd2
commit
3299ff78c0
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ $uacDisablerTriggerProperty = "UACDisablerTrigger";
|
|||
|
||||
function New-PersonalUser([Context] $context)
|
||||
{
|
||||
if (-not (Get-LocalUser $context.UserName))
|
||||
if (-not (Get-LocalUser $context.UserName -ErrorAction SilentlyContinue))
|
||||
{
|
||||
Write-Host "Creating Personal User";
|
||||
|
||||
|
@ -144,6 +144,6 @@ function Enable-PersonalUserAutologon([Context] $context)
|
|||
}
|
||||
|
||||
$context.Set($preparedUsernameProperty, $context.UserName, "ExpandString");
|
||||
$context.Set($preparedUsernameProperty, $password, "ExpandedString");
|
||||
$context.Set($preparedUsernameProperty, $password, "ExpandString");
|
||||
Write-EventLog -LogName Application -Source "Application" -EventId $context.Get($autoLoginTriggerProperty) -Message "This event was created by $env:Username";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue