Use Slack.com Incoming Webhooks
suggest changeBuild the payload. Slack's incoming webhook expects JSON.
$Payload = @{ text="test string"; username="testuser" }
ConvertTo-Json builds the body. Invoke-RestMethod sends it:
Invoke-RestMethod -Uri "https://hooks.slack.com/services/yourwebhookstring" -Method Post -Body (ConvertTo-Json $Payload)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents