2019 12 10 at 09.41

Send online alert to webhook (Teams)

Send a notification to Teams


This Agent Procedure will send out a notification to a webhook when it has run. I use this to notify a channel when a device is online again, after a Windows Upgrade or when a device has been lost. A sample text has been added for that.

The Agent Procedure was made for Teams webhook, but should work for Slack webhook too.

  • Name: Jeffrey
  • Company: The IT Guy
  • Website: http://theitguy.amsterdam
  • Contact Developer
  • Summary
  • Send online alert to webhook (Teams)
  • Version:
  • Initially Released December 10th, 2019
  • Reviews
    Gravatar for Deren Patterson
    by Deren Patterson on December 12th, 2019

    Works! I followed the instructions from Microsoft to create the webhoook. I edited the first line of code in the script. This is line 2 which is the first getvariable command. It has 5 options in the command. I put my URL from the webhook in the first type-able field without any extra quotes or anything. Saved and tested on an offline VM. Brought the VM online and got a MS Teams notification on. This will be nice when you really just need that extra look out on a machine.

    Gravatar for JoeO
    JoeO over 1 year ago

    Just a quick FYI. Invoke-Restmethod (which really open a wealth of opportunity for integration, think Microsoft Flow..) requires a minimum of PowerShell 3.0. Some Windows 7/2008 boxes might be outdated. You can use a procedure to grab the PS version and update to a custom field (example below). You can then run a procedure on that View to upgrade the PS version. If needed i can provide such a procedure. 

    ($PSVersionTable.Psversion | Select-Object major | ft -HideTableHeaders | Out-String).trim()