Manage Shared Channels in Microsoft Teams Using PowerShell: Effective Collaboration Strategy
Microsoft developed shared channels to facilitate effective collaboration and contributions among users with a long-term vision. In order to utilize the full potential of this collaborative approach, admins must proficiently manage Microsoft Teams shared channels. The channels, which are also called Microsoft Teams Connect, facilitate collaboration between teams of different organizations, beyond boundaries.
Let’s delve into the process of shared channel management using Windows PowerShell. Before we dive into the management process, it’s essential to understand shared channels, as some may not be familiar with them.
A shared channel is a type of channel in Microsoft Teams that enables users to collaborate with other teams or users who are not part of their primary team. Additionally, shared channels allow for collaboration between external organizations. You can also invite users to a shared channel even if they aren’t part of any teams.
Before we begin, you need to connect to Microsoft Teams PowerShell module as a global or Teams administrator to effectively manage shared channels.
Here’s a list of the major PowerShell operations we’ve covered in this blog for efficient Microsoft Teams connect shared channel management.
- Create shared channels in Microsoft Teams
- List all shared channels of a team
- Delete a shared channel in Microsoft Teams
- Add members to a shared channel
- Add multiple users to shared channels
- Add external users to Microsoft Teams shared channels
- Get a list of members in a shared channel
- Get a list of teams where the shared channel is shared
- Retrieve the user details of a team which has shared channel access
- Remove a user from a Teams shared channel
- Bulk users removal from a Teams shared channel
Using PowerShell, you can quickly create Microsoft Teams shared channels. To create a shared channel in a team, execute the cmdlet below with the channel name and the team’s group ID.
New-TeamChannel -GroupId <Team’sGroupID> -DisplayName <NewSharedChannelName> -MembershipType Shared
To know the team’s group ID, use the “Get-Team” cmdlet. Further, to track the recently created shared channels, make use of this PowerShell script to audit MS Teams channel creations.
Note: Only team owners can create shared channels in Microsoft Teams.
To list all the shared channels that are present in a specific team, use the PowerShell cmdlet “Get-TeamAllChannel” as mentioned below.
Get-TeamAllChannel -GroupId <Team’sGroupID> -MembershipType Shared
Moreover, admins can use the Microsoft Teams policies to restrict the creation of shared channels.
You can delete unwanted shared channels in Microsoft Teams using the PowerShell cmdlet “Remove-TeamChannel” as mentioned below.
Remove-TeamChannel –GroupId <GroupID> -DisplayName <SharedChannelName>
Admins can easily add members to private channels using the “Add-TeamChannelUser” cmdlet as described below.
Add-TeamChannelUser -GroupId <Team’sGroupID> -DisplayName <SharedChannelName> -User <UPN>
To add bulk users to shared channels, create the CSV file with the user’s UPN as mentioned below.
After the creation of the CSV file, execute the following cmdlet with the CSV file location.
Import-Csv <FileLocaion> |Foreach {Add-TeamChannelUser -GroupId <Team’sGroupID> -DisplayName <SharedChannelName> -User $_.UPN}
Admins can share a team channel externally by configuring the tenant-wide settings. You can add external users to Teams shared channels through B2B direct connect settings using the cmdlet mentioned below.
Add-TeamChannelUser -GroupId <Team’sGroupID> -DisplayName <SharedChannelName> -User <EXTUserUPN> -TenantId <EXTTenantId>
Points to remember:
- You can’t make the external users as owners of shared channels.
- You can also share the shared channel with the other Teams using the Microsoft Teams client application, but it is not possible through PowerShell.
Admins can easily retrieve the users in the shared channel with the “Get-TeamChannelUser” cmdlet. Include the shared channel name in the display name parameter to get the user details of the MS Teams shared channel.
Get-TeamChannelUser –GroupId <GroupId> -DisplayName <SharedChannelName>
For a detailed analysis, you can download shared channel membership report with the help of PowerShell scripting.
To get a list of teams where the shared channel is shared, use the PowerShell cmdlet “Get-SharedWithTeam“.
Get-SharedWithTeam -HostTeamId <HostTeamGroupId> -ChannelId <SharedChannelId>
Replace <HostTeamGroupId> with the team’s group ID that is hosting the shared channel (The team in which the shared channel is created), and <SharedChannelId> with the ID of the shared channel that is shared among teams.
We all know that the shared channel can be shared with other teams. To discover the users from a specified team which has access to the shared channel, utilize the “Get-SharedWithTeamUser” cmdlet as shown below.
Get-SharedWithTeamUser -HostTeamId <HostTeamGroupId> -ChannelId <SharedChannelId> -SharedWithTeam <AccessingTeamId>
Replace <AccessingTeamId> with the team ID of the other team with which the shared channel is already shared.
To remove a user from a team’s shared channel, run the cmdlet with the appropriate values.
Remove-TeamChannelUser -GroupId <Team’sGroupID> -DisplayName <SharedChannelName> -User <UPN>
To demote the existing owner as a member of the shared channel use the same cmdlet with the “Role” parameter.
Remove-TeamChannelUser -GroupId <Team’sGroupID> -DisplayName <SharedChannelName> -User <UPN> -Role Owner
Note: You can’t directly remove owners from the shared channel. To remove owners, first demote them to members and then remove them as members.
To remove multiple members from any team’s shared channel, create a CSV file as shown below and execute the cmdlet.
Import-Csv <FileLocaion> |Foreach {Remove-TeamChannelUser -GroupId <Team’sGroupID> -DisplayName <SharedChannelName> -User $_.UPN}
These are the key PowerShell operations to manage Microsoft Teams Shared Channels.
Some of the limitations of MS Teams shared channels are listed below:
- Certain features like apps, bots, connectors, and message extensions are not supported in shared channels.
- It is impossible to add a guest user to a shared channel.
- Only the owner of the shared channel can add or remove users.
- Each team can have a maximum of 200 shared channels.
- Shared channels can have up to 5,000 direct members.
- Shared channels can shared with a maximum of 50 teams.
- A shared channel within a team can accommodate up to 25,000 members.
- Notifications from shared channels are not included in missed activity emails.
- It is impossible to share a shared channel with the other teams using PowerShell
To excel in the realm of efficiently managing shared channels in Microsoft Teams, you need access to a comprehensive set of reports. You might be wondering, “Can we not acquire these reports using PowerShell cmdlets and scripts?” Well, technically, you can, but this approach often leads to the risk of execution errors and the laborious task of applying filters to extract your desired results.
But here’s the exciting part: AdminDroid, a dedicated Microsoft 365 reporting tool, eliminates these challenges, making shared channel management a breeze! With AdminDroid, you can effortlessly access a range of exclusive reports for teams’ shared channels, with robust filter customizations.
The MS Teams reports from AdminDroid include the following reports on shared channels:
- All shared channels
- All teams with shared channels
- Shared channels without descriptions
- Shared channels with external users
But that’s not all! AdminDroid’s Microsoft Teams reporting tool exhibits over 70+ reports enriched with advanced AI graphics. These reports provide insights into various aspects of MS Teams, including memberships, standard & private channels, team settings, permissions, inactive users, device usage, and much more.
Just like adding brilliance to your experience, AdminDroid’s Microsoft Teams auditing offers over 30 reports that allow you to track real-time Microsoft Teams events. These audit reports cover metrics related to team membership changes, external sharing, file access audits, team setting changes, and more, all with ease.
Additionally, the Teams dashboard gallery gives an eagle sight that has comprehensive overview into the entire MS Teams usage.
And that’s just the beginning. Beyond teams reports, AdminDroid offers a staggering 1800+ comprehensive reports and 30+ powerful dashboards. These encompass features such as alerting, scheduling, and granular access delegation.
AdminDroid’s reports span across various Microsoft 365 services, including Microsoft Entra ID, Exchange Online, MS Teams, OneDrive, Power BI, Stream, Viva Engage, and more.
So, what are you waiting for? Download AdminDroid now and unlock its premium features with a 15-day free trial! Your journey to efficient and insightful reporting begins here😁.
Expanding the horizons of Microsoft Teams management with PowerShell, we hope that this blog will helps you to manage shared channels. If you have any queries regarding this blog, feel free to leave them in the comments section. We are always happy to help you😁!