Custom notifications in Microsoft Teams

I started googling around to see if Teams had any PowerShell commandlets. Does not look like it, but its a work in progress. There is still a way to interact with Teams trough PowerShell.

There is a connector in Teams called Incoming Webhook. This connector can post notifications from any scripting language trough JSON formatted web service call.
This can be used to post for example a notification if there is a ping higher than 200ms on a group of servers. But, since it is Friday, I found a more suitable use of this function. Lets create a script that takes care of the weekly wine lottery draw.

First go to the desired channel in Teams and select Connectors from options.

Search for webhook and press Configure
Set a name for the Incoming Webhook and press Create further down.


Copy the url and press Done.

teams msg.PNG

Write the script like this.

Set up the script as a weekly scheduled task and you are good to go.



To read more on this topic read this article here:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s