Prevent unnecessary output

This commit is contained in:
Manuel Thalmann 2024-03-24 16:56:55 +01:00
parent 7ae676141d
commit 94024951ff

View file

@ -174,7 +174,7 @@ function Start-EventDrivenTask() {
$entry = $event.SourceEventArgs.Entry; $entry = $event.SourceEventArgs.Entry;
if ($entry.EventID -eq $EventID) { 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"; 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 } -args $EventID
} }