PSTeams - Sending notifications to Microsoft Teams Channels from Windows / Linux and Mac
As I am in cross-platform mood lately I've decided to update PSTeams PowerShell Module to work across Windows / Linux and Mac.
Blog post about it: https://evotec.xyz/psteams-send-notifications-to-ms-teams-from-mac-linux-or-windows/
I actually used simple script (as seen below) to create a pester/testing script. When Azure Pipelines (allows testing Mac/Linux/Windows scripts at same time - nice addition from Microsoft) are done checking my changes/commits on GitHub it sends me update (and confirms code works as expected at same time) directly to MS Teams.
How to install
Install-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
Hope you enjoy this one!
https://i.redd.it/4r976le1p7q11.png
Posted Oct 4, 2018, 6:27 PM UTC
243
sounds like its time to freak out my coworker
Why would you do that to him?!