Created
April 5, 2017 10:27
-
-
Save kmhuglen/0f65e6a1e73e811b7de2d5eea30b1494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$EntryType = "{Output - 1 - Value from "monitor Orchestrator SNMP Traps"}" | |
$Message = "{Output - 2 - Value from "monitor Orchestrator SNMP Traps"} - {Output - 3 - Value from "monitor Orchestrator SNMP Traps"}" | |
$EventID = "1000" | |
$LogName = "SNMPTrapMonitor" | |
$SourceName = "SNMPTrapMonitor" | |
$NewEventLog = Get-EventLog -list | Where-Object {$_.logdisplayname -eq $LogName} | |
IF (!$NewEventLog.Log -eq $LogName) {New-EventLog -LogName $LogName -Source $SourceName} | |
Write-EventLog -logname $LogName -source $SourceName -eventID $EventID -message $Message -EntryType $EntryType |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment