Skip to content

Instantly share code, notes, and snippets.

@sgaulding
Created August 19, 2015 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgaulding/79d7bc8337c346f073a9 to your computer and use it in GitHub Desktop.
Save sgaulding/79d7bc8337c346f073a9 to your computer and use it in GitHub Desktop.
Post to Slack
$slackMessage = "Test Message"
$postSlackMessage = @{token="{token}";channel="{channel}";username="{user}";text=$slackMessage;icon_emoji=":loudspeaker:";}
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