はじめに SlackにPowerShellスクリプトやAzure Automationでメッセージを投稿した時の備忘録 SlackAPIのトークン取得 Slackに投稿する時は固有のトークンが必要なので https://api.slack.com/docs/oauth-test-tokens からトークンを生成しておく。 PowerShellスクリプトの作成 特定のURL( https://slack.com/api/chat.postMessage )に 特定の形式のデータをPOSTするだけでメッセージ投稿できる。 $postSlackMessage = @{token='YourToken'; channel='targetChannel'; text='BOTテスト'; username='BOTテスト'} Invoke-RestMethod -Uri "https://slack.