Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 3.45 KB

README.md

File metadata and controls

70 lines (44 loc) · 3.45 KB

Slack Module Slack, A PowerShell Module

Build Status GitHubRelease PSGallery PSGalleryDL Slack License


Introduction

Slack is a PowerShell Module for composing and sending Slack messages using the new Slack Blocks.

Purpose

The main purpose for this module is to help PowerShell users easily and quickly craft Slack messages that look good using their existing PowerShell skills. Use this module to output information from your scripts and functions to a Slack Channel. If you really want to, you could enable interactive components (there are plans to make this easier, but for now, you'll have to figure out that set up on your own)!

Getting Started

To use Slack you will need access to a Slack Workspace with a Slack Application and either have a User Token, a Bot Token, or a Webhook.

Create a Slack Workspace

If necessary, create a Slack Workspace, otherwise, if you already have access to a Slack Workspace, proceed to the next step.

Create a Slack Application

Create a Slack Application and install it in your desired Slack Workspace.
There are several options to start sending messages to Slack via PowerShell.

Option A: Webhooks

From the Basic Information page for your Slack App, click Add features and functionality, then Incoming Webhooks. Turn them on, and click Add New Webhook to Workspace. Select a channel to post to, click allow, then copy the webhook to use in your PowerShell code.

Option B: OAuth Access Token

Option C: Bot User OAuth Access Token

Install and Configure the Module

Install-Module -Name Slack

Contributing

Pester Tests should be run on PowerShell Core.