Skip to content

Team Modules

Tylous edited this page Mar 14, 2024 · 3 revisions

Get-TeamsChannels

This module enumerates all accessible teams and the channels a user has access to.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-TeamsChannels -Tokens $tokens

image

Find-ChannelEmails

This module enumerates all accessible teams and the channels looking for any email addresses assoicated with them.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter

Find-ChannelEmails -Tokens $tokens

image

Get-ChannelUsersEnum

This module enumerates a defined channel to see how many people are in a channel and who they are.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Channel        - The channel name to enumerate 
Teams           - The team name that the channel resides in
Get-ChannelUsersEnum -Tokens $tokens -Channel "ChannelName" -Teams "TeamName"
image

Get-ChannelEmail

This module enumerates a defined channel for an email address and sets the sender type to Anyone. If there is no email address create one and sets the sender type to Anyone.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Channel        - The channel name to set or create the email address for
Teams           - The team name that the channel resides in
Get-ChannelEmail -Tokens $tokens -Channel "ChannelName" -Teams "TeamsName"
image

Get-Webhooks

This module enumerates all accessible channels looking for any webhooks and their configuration information, including its the url.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-Webhooks -Tokens $tokens

image

Create-Webhook

This module creates a webhook in a defined channel and provides the URL.

--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Channel        - The channel name to create the webhook in
Teams           - The team name that the channel resides in
Name           - The name you want to call the created webhook
ConnectorType  - The the type of connector to use for the webhook (IncomingWebhook, Jira , Jenkins, AzureDevOps)
Create-Webhook -Tokens $tokens -Channel "Channel Name" -Teams "TeamsName" -Name "Evil-Hook" -ConnectorType IncomingWebhook
image

Send-TeamsMessage

This module sends a message using Microsoft Team's webhooks, without needing any authentication

--OPTIONS--
webhookUrl      - The full webhook url to use to send a message to. e.g. https://acmedomain.webhook.office.com/... Can also pass a $varible containing the url as well.
MessagecardFilePath - The full path to the message template file you want to send.
Send-TeamsMessage -webhookUrl $url -MessagecardFilePath .\message.txt
image #### Get-TeamsApps This module enumerates all accessible Teams chat channel and grabs the URL for all installed apps in side each channel.
--OPTIONS--
Tokens         - Pass the $tokens global variable after authenticating to this parameter
Get-TeamsApps -Tokens $tokens
image