- 將 LINE Notify 加入 group
- login LINE Notify,選擇 個人頁面
- 用powershell發送LINE訊息 (紅色的token是上一步複製的)
function Send-ToLine([string]$msg){
$uri = 'https://notify-api.line.me/api/notify'
$token="Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$header = @{Authorization = $token}
$msgLine=@{message=$msg}
invoke-restmethod -Uri $uri -Method Post -Headers $header -Body $msgLine
}
Send-ToLine -msg ("LINE Notify Test");
沒有留言:
張貼留言