Commande PowerShell Slack
$uriSlack = "https://hooks.slack.com/services/{guids}"
$body = ConvertTo-Json @{
pretext = "Hello world"
text = "This is the text below with a blue thingy next to it"
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..."
}
Adorable Antelope