Manage Shared Channels in Microsoft Teams Using PowerShell: Effective Collaboration Strategy

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.

What Is a Shared Channel?

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.

Manage Shared Channels in Microsoft Teams Using PowerShell

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 Using PowerShell

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

Create Shared Channels in Microsoft Teams Using PowerShell

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.

List All Shared Channels of a Team Using PowerShell

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

List All Shared Channels of a Team Using PowerShell

Moreover, admins can use the Microsoft Teams policies to restrict the creation of shared channels.

Delete a Shared Channel in Microsoft Teams Using PowerShell

You can delete unwanted shared channels in Microsoft Teams using the PowerShell cmdlet “Remove-TeamChannel” as mentioned below.

Remove-TeamChannel –GroupId <GroupID> -DisplayName <SharedChannelName>

Add Members to a Shared Channel Using PowerShell

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>

Add Multiple Users to Shared Channels Using PowerShell

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}

Add External Users to Microsoft Teams Shared Channels Using PowerShell

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:

  1. You can’t make the external users as owners of shared channels.
  2. You can also share the shared channel with the other Teams using the Microsoft Teams client application, but it is not possible through PowerShell.

Get a List of Members in a Shared Channel Using 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.

Get a List of Teams Where the Shared Channel is Shared

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.

Get Teams with Which the Shared Channel Is Shared Using PowerShell

Retrieve the User Details of a Team Which Has Shared Channel Access

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.

Retrieve Users of the Team with which the Specified Channel is Shared

Remove a User from a Teams Shared Channel Using PowerShell

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.

Bulk Users Removal from a Teams Shared Channel with PowerShell

To remove multiple members from any team’s shared channel, create a CSV file as shown below and execute the cmdlet.

Remove bulk users from shared channels with PowerShell

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.

Microsoft Teams Shared Channel Limitations

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

Improve Shared Channel Management with AdminDroid

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.

Shared channels report using AdminDroid

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.

Teams overview using AdminDroid

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😁!

Manage Shared Channels in Microsoft Teams Using PowerShell: Effective Collaboration Strategy

by Thiraviam time to read: 6 min
0