Use Slack.com Incoming Webhooks
suggest changeDefine your payload to send for possible more complex data
$Payload = @{ text="test string"; username="testuser" }
Use ConvertTo-Json cmdlet and Invoke-RestMethod to execute the call
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