$mydate = (Get-date).addminutes(-15) #$mydate = (Get-date).Addhours(-5) $EventID = Get-EventLog -LogName System | ? {$_.EventID -eq 429 -and $_.timegenerated -gt $mydate } if($eventid) { #found desired events; Restarting the service write-host “Found the events; Trying to restart the service” Get-Service -displayname “IIS Admin” | Restart-Service -force Get-Service -displayname “Simple Mail Transfer Protocol (SMTP)” | start-Service -force […]Image may be NSFW.
Clik here to view.
Clik here to view.
