-
Notifications
You must be signed in to change notification settings - Fork 5
Home
#Getting started: Powershell.Slack is a set of two functions which you will need to copy and paste into the top of your script so that they can be used. To obtain the functions, just click on the Download Zip button on the main page. Please note that copying and pasting the code straight from the preview window on the website will insert special characters that will break the function, so it is best to just download the zip.
##The functions: There are two functions that you will need to use in order to send messages to slack.
New-SlackRichNotification creates the message. You can use this to add things like text, colour, tables, images, etc...
Send-SlackNotification takes the message and sends it to the specified Webhook URL.
##Create a Webhook: Before you can start posting messages to slack, you need to Create an Incoming Webhook. Once you have created the WebHook you will have a WebHook URL that you need to paste into the Send-SlackNotification URL parameter. Now you can start crafting messages with New-SlackRichNotification and sending them to slack via Send-SlackNotification and thus your Webhook.