Skip to content

Instantly share code, notes, and snippets.

@IlyaFinkelshteyn
Created September 15, 2017 02:09
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 IlyaFinkelshteyn/0796f738317dcb47ba62719d69e05c2c to your computer and use it in GitHub Desktop.
Save IlyaFinkelshteyn/0796f738317dcb47ba62719d69e05c2c to your computer and use it in GitHub Desktop.
$token = "<clear_text_api_token>"
$Channel = "<channel>"
$Message = "test from ps"
$body = @{
token = $token
channel = $Channel
text = $Message
}
Invoke-RestMethod -Uri 'https://slack.com/api/chat.postMessage' -Body $body -Method POST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment