Skip to content

Instantly share code, notes, and snippets.

@tomorgan
Created November 7, 2016 20:42
Show Gist options
  • Save tomorgan/9331fcc48a1c8a917fb6456799d59a97 to your computer and use it in GitHub Desktop.
Save tomorgan/9331fcc48a1c8a917fb6456799d59a97 to your computer and use it in GitHub Desktop.
$body = @{text = "Hello to Teams from PowerShell"}
$uri = "https://outlook.office365.com/webhook/...YOUR URL HERE..."
Invoke-RestMethod -Method Post -Uri "$uri" -Body (ConvertTo-Json $body) -Header @{"Content-Type"="application/json"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment