Powershell module to enable easy invocation of HTTP Endpoints used to enable notifications when a powershell execution is completed.
Install-Module -Name PSNotification
Get-Command -Module PSNotification
Update-Module -name PSNotification
Set-PSNUrl -Url "https://prod-35.westeurope.logic.azure.com:443/workflows/14adfasdrae23354432636dsfasfdsaf/"
Do-Stuff | Invoke-PSNMessage -Email "Claire@contoso.com" -Subject "Stuff was done"
This will invoke the default URL for each output piped from the Do-Stuff cmdlet / function. This execution is synchronous and will block the execution until the HTTP endpoint responds.
Do-Stuff | Invoke-PSNMessage -Email "Claire@contoso.com" -Subject "Stuff was done" -AsJob
This will invoke the default URL for each output piped from the Do-Stuff cmdlet / function. This execution is asynchronous and will start a background job that handles everything with the HTTP endpoint.