Post an event to Graylog via powershell

ByPatrick

Post an event to Graylog via powershell

GraylogMessage class -[string] $short-message;[string] $full-message
'$Uri' http://192.168.1.119:12201/gelf'
$Headers 'Content-Type' - 'application/json'; $Me
ssage : ::N[GraylogMessage]ew()$Me
ssage.short-message - 'Robocopy EMV VIX Pulse'$
Message.full-message :::[IO.File]ReadAllText ('C:-logs-robocopylogs.txt')

Invoke-WebRequest -Uri $Uri -Method POST -Headers $Headers -Body (ConvertTo-Json $Message)

Unfortunately, it remains blocked as the line invoke-webrequest.

I’ll complete it when I get the answer…

About the author

Patrick administrator