Skip to content

Commit

Permalink
refactor: Update snort.ps1 to use hidden task settings when registeri…
Browse files Browse the repository at this point in the history
…ng Snort as a scheduled task
  • Loading branch information
bengo237 committed Sep 11, 2024
1 parent f26ae18 commit 3e112b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/windows/snort.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ function Install-Snort {
$taskName = "SnortStartup"
$taskAction = New-ScheduledTaskAction -Execute "C:\Snort\bin\snort.exe" -Argument "-c C:\Snort\etc\snort.conf -A full -l C:\Snort\log\ -i 5 -A console"
$taskTrigger = New-ScheduledTaskTrigger -AtStartup
Register-ScheduledTask -TaskName $taskName -Action $taskAction -Trigger $taskTrigger -RunLevel Highest
$taskSettings = New-ScheduledTaskSettingsSet -Hidden
Register-ScheduledTask -TaskName $taskName -Action $taskAction -Trigger $taskTrigger -Settings $taskSettings -RunLevel Highest

Write-Host "Installation and configuration completed!"
}
Expand Down

0 comments on commit 3e112b9

Please sign in to comment.