Created
April 7, 2017 04:31
-
-
Save KMR-zoar/6d972fdaf2436eaf64cbed7c44cb4a6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Push-Notification () { | |
$webhookuri = "" | |
$username = "" | |
$datetime = Get-Date -Format "yyyy/MM/dd-HH:mm:ss" | |
$text = @{ text = "$username $env:USERDOMAIN has task completed. $datetime"; link_names= 1} | |
$payload = ConvertTo-Json -InputObject $text | |
Invoke-RestMethod -Uri $webhookuri -Method Post -Body $payload > $null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment