Skip to content

This PowerShell Module allows to send notifications to Microsoft Teams. It's pretty flexible and provides a bunch of options. While there are already 2 other modules related to sending notifications to Teams this one takes it a step further.

Notifications You must be signed in to change notification settings

KamikazePlayer/PSTeams

 
 

Repository files navigation

Build Status Windows/Linux/Mac PowerShellGallery Version

PowerShellGallery Platform PowerShellGallery Preview Version

Top Language Code PowerShellGallery Downloads

PSTeams - PowerShell Module

PSTeams is a PowerShell Module working on Windows / Linux and Mac. It allows to send notifications to Microsoft Teams. It's pretty flexible and provides a bunch of options.

For description and advanced usage visit PSTeams dedicated page.

Updates

  • 0.4.0 / 2019.04.03

    • fix for UTF-8 charset - (provided by hjorslev)
    • emoji support added - (provided by hjorslev) - to use it you may need UTF-8 with BOM file encoding
  • 0.3.x / 2019.02.21

    • added summary for message that is visible in Activity pane
  • 0.2.x / 2018.10.04 - full blog post

    • added cross-platform (works on linux, mac os, windows)
    • added azure pipelines
    • added some pester tests
  • 0.1.x / 2018.07.12

    • first release

Installing on Windows / Linux / MacOS

Install-Module PSTeams
#Install-Module PSTeams -Scope CurrentUser
#Update-Module PSTeams

Usage

$TeamsID = 'YourCodeGoesHere'
$Button1 = New-TeamsButton -Name 'Visit English Evotec Website' -Link "https://evotec.xyz"
$Fact1 = New-TeamsFact -Name 'PS Version' -Value "**$($PSVersionTable.PSVersion)**"
$Fact2 = New-TeamsFact -Name 'PS Edition' -Value "**$($PSVersionTable.PSEdition)**"
$Fact3 = New-TeamsFact -Name 'OS' -Value "**$($PSVersionTable.OS)**"
$CurrentDate = Get-Date
$Section = New-TeamsSection `
    -ActivityTitle "**PSTeams**" `
    -ActivitySubtitle "@PSTeams - $CurrentDate" `
    -ActivityImage Add `
    -ActivityText "This message proves PSTeams Pester test passed properly." `
    -Buttons $Button1 `
    -ActivityDetails $Fact1, $Fact2, $Fact3
Send-TeamsMessage `
    -URI $TeamsID `
    -MessageTitle 'PSTeams - Pester Test' `
    -MessageText "This text won't show up" `
    -Color DodgerBlue `
    -Sections $Section

How does it look like?

  • When executed from Linux

image

  • When executed from Windows

image

  • When executed from MacOS

image

image

About

This PowerShell Module allows to send notifications to Microsoft Teams. It's pretty flexible and provides a bunch of options. While there are already 2 other modules related to sending notifications to Teams this one takes it a step further.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%