Skip to content

Instantly share code, notes, and snippets.

@devlead
Created January 8, 2015 16:10
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devlead/9146bf4aec78c7b1114e to your computer and use it in GitHub Desktop.
Save devlead/9146bf4aec78c7b1114e to your computer and use it in GitHub Desktop.
Post to slack from PowerShell
$postSlackMessage = @{token="*topsecret*";channel="#general";text="Hello from PowerShell!";username="PowerShell";icon_url="https://pbs.twimg.com/profile_images/1604347359/logo_512x512_normal.png"}
Invoke-RestMethod -Uri https://slack.com/api/chat.postMessage -Body $postSlackMessage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment