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.
-
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
Install-Module PSTeams
#Install-Module PSTeams -Scope CurrentUser
#Update-Module PSTeams
$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
- When executed from Linux
- When executed from Windows
- When executed from MacOS
- And this is more advanced option sent by PSWinReporting