PowerShellでIncoming Webhook

事前準備

PowerShellでIncoming WebHooksを実行

 $url = "https://hooks.slack.com/services/ABC/XYZ/012345"
 $data = @{ "text" = "Hello, World!"; "username" = "ghost-bot"; "icon_emoji" = ":ghost:"; "channel" = "#general" }
 $json_str = $data | ConvertTo-Json
 $body = [System.Text.Encoding]::UTF8.GetBytes($json_str)
 Invoke-WebRequest -Method Post -Uri $url -ContentType "application/json" -Body $body

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS

Last-modified: 2016-04-02 (土) 08:05:28