If you're new to this module it's very simple PowerShell module allowing to send notifications straight to Microsoft Teams channels. Full overview of this module is available on dedicated page for PSTeams. New release version 0.2 is small addition to PowerShell cross-platform modules allowing you to run it on Windows, Linux or Mac. This means from now on you can tell your scripts on Linux to send information straight to Microsoft Teams!
Please notice this article contains parts of information (still useful) and may not reflect all functionalities of this module. For download, source code and so on you should refer to the dedicated PSTeams module page. After reading this one… of course! It contains useful information, examples and know-how. Without it… you may be lost!
I've actually used this release as a testing ground for Azure Pipelines (Azure DevOps) that allows for testing PowerShell modules on all 3 platforms (Windows / Linux and Mac) along with using Secret/Private Key (Teams Channel ID). I've actually written simple Pester for this scenario that sends a message to my testing Microsoft Teams channel with information when testing on each platform is done. So when I commit new changes to GitHub I expect to get new notifications in Teams.
This also shows how useful it can be for random scripts you run in your environment. You can simply add notification before/after with some specific information that you need such as script executed successfully, user was added to AD and so on. My current biggest use case for this is my PSWinReporting project that sends updates Live as they happen on Active Directory telling me that user was added or removed from group or that he changed his password.
$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)**"
This is the code responsible for what you see on Pester tests. So have fun. Make sure to check main PSTeams article for a full know-how.