From 94024951ff371f7e82aa9407538d92d937acd383 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 24 Mar 2024 16:56:55 +0100 Subject: [PATCH] Prevent unnecessary output --- scripts/Windows/OS/User/Add.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Windows/OS/User/Add.ps1 b/scripts/Windows/OS/User/Add.ps1 index 36a090e6..8326b73d 100644 --- a/scripts/Windows/OS/User/Add.ps1 +++ b/scripts/Windows/OS/User/Add.ps1 @@ -174,7 +174,7 @@ function Start-EventDrivenTask() { $entry = $event.SourceEventArgs.Entry; if ($entry.EventID -eq $EventID) { - New-Event -SourceIdentifier $identifier; + $null = New-Event -SourceIdentifier $identifier; } }; @@ -184,6 +184,6 @@ function Start-EventDrivenTask() { }; Write-EventLog -LogName Application -Source "Application" -EventId $EventID -Message "This event was created by $env:Username"; - Wait-Job $job; + $null = Wait-Job $job; } -args $EventID }