Notifications on program startup. Minor changes in scripts.

Notifications on program startup. Minor changes in scripts.
This commit is contained in:
Alexander I. Chebykin
2022-06-27 18:14:13 +03:00
parent 577ad19b9f
commit ccb471dcc2
7 changed files with 118 additions and 10 deletions

View File

@@ -0,0 +1,10 @@
Param([Parameter(Mandatory=$true)][String]$Message)
$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)"