$uriSlack = "URL"
$body = ConvertTo-Json @{
pretext = "test"
text = "test"
color = "#142954"
}
try {
Invoke-RestMethod -uri $uriSlack -Method Post -body $body -ContentType 'application/json' | Out-Null
} catch {
Write-Error (Get-Date) ": Update to Slack went wrong..."
}
No comments:
Post a Comment