CAI-Watchdog/scripts/windows/send-telegram.ps1.template
Alexander I. Chebykin b55f72f2e4 Configuration file options modified.
address renamed to uri, <header> renamed to <subject>
2022-06-27 21:37:11 +03:00

9 lines
323 B
Plaintext

$Telegramtoken = "Your_Telegram_Token"
$Telegramchatid = "Your_Telegram_Chat_ID"
$Message = $args[0]
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Response = Invoke-RestMethod -Uri "https://api.telegram.org/bot$($Telegramtoken)/sendMessage?chat_id=$($Telegramchatid)&text=$($Message)"