Skip to content

pliyo/slack-incoming-webhook-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Slack Incoming Webhook Notification using Powershell

Required powershell version: 3 and onwards

Thea idea behind this project is to notify at the beginning of each deployment with a message in slack. So I wrote this powershell that will do the work for me

The challenge was to understand how to write a simple json object inside a powershell by doing:

@{
 "YourJson" : "GoesHere"
}@

And the multiple possibilities that offer Incoming Webhooks (Customize Slack -> Configure Apps -> Search -> Incoming Webhooks -> Install)

About the project

We are using

Get-Date.AddMinutes(5)

To get the current date and add to that 5 minutes. Because all our deployments need to be notified with at least five minutes in advance.

$currentTime.ToShortTimeString() will return the hour, so for example: 02:43

About

Notifications to Slack using Incoming Webhooks and Powershell

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published