Slack
Examples of integrating Slack with PowerShell Universal.
Send Message to Slack
Start-PSUServer -Port 8080 -Configuration {
New-PSUEndpoint -Url "/slack" -Method POST -Endpoint {
$Body = @{
text = "Hello"
} | ConvertTo-Json
Invoke-RestMethod -Uri 'https://hooks.slack.com/services/0000000000/00000000/00000000000000000' -Body $Body -Method POST
}
}Invoke-RestMethod http://localhost:8080/slack -Method POST
Send Slack Message on Failed Job


Last updated
Was this helpful?