Friday , August 7 2020

Export all Teams Channels and all members in Office 365

In some situations like if we wish to study a new environment or restructure a existing environment or check user teams channels membership across the tenant. we have to Export all the Teams Channels and all the members of it to a CSV file. There is no command let available to retrieve the Teams and Channel members in bulk. Pipe line won’t work in this case. Its very similar to Distribution Group and its members like in Exchange online.Which i wrote a script many years back.

Lets see how to do similar stuff in Microsoft Teams PowerShell native module. if you want to know how to install latest repositories and

PLEASE NOTE YOU HAVE TO USE PRE RELEASE version for the script to work which is covered in below article. Get-TeamChannelUser doesn’t work on Production PowerShell Respository.

Install-Module PowerShellGet -RequiredVersion

To use pre-release version – (Get-TeamChannelUser is available only on pre release version for now)

Install-Module -Name MicrosoftTeams -RequiredVersion 1.1.3-preview -AllowPrerelease

Connect to Microsoft Teams Powershell i have covered in this article.

Download the Script

Choose the Task 1 to Export the minimal data and display in shell.

PS C:\Scripts> .\TeamsChannelMemberReport.ps1

Teams Channel Member Report

1.Display in Microsoft Teams Shell

2.Export to CSV File

Choose The Task: 1

User SMTP Address Role Channel DisplayName Team DisplayName
—————– —- ——————- —————- Owner General Teams_Azure365pro Member General Teams_Azure365pro

Download the Script

Choose the Task 2 to Export the all the Teams Channels Membership data with Teams settings to a CSV File.

PS C:\Scripts> .\TeamsChannelMemberReport.ps1

Teams Channel Member Report

1.Display in Microsoft Teams Shell

2.Export to CSV File

Choose The Task: 2
Enter the Path of CSV file (Eg. C:\Teams.csv): c:\Scripts\Teams.csv

CSV Will Export Below Columns

  • DisplayName
  • UserId
  • User SMTP Address
  • Role
  • Channel DisplayName
  • Channel Description
  • Channel MembershipType
  • Team GroupID
  • Team DisplayName
  • Team Description
  • Team Visibility
  • Team MailNickName
  • Team Classification
  • Team Archived
  • Team AllowGiphy
  • Team GiphyContentRating
  • Team AllowStickersAndMemes
  • Team AllowGuestCreateUpdateChannels
  • Team AllowGuestDeleteChannels
  • Team AllowCreateUpdateChannels
  • Team AllowCreatePrivateChannels
  • Team AllowDeleteChannels
  • Team AllowAddRemoveApps
  • Team AllowCreateUpdateRemoveTabs
  • Team AllowCreateUpdateRemoveConnectors
  • Team AllowUserEditMessages
  • Team AllowUserDeleteMessages
  • Team AllowOwnerDeleteMessages
  • Team AllowTeamMentions
  • Team AllowChannelMentions
  • Team ShowInTeamsSearchAndSuggestions

CSV File will look like –

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Office Server and Services MVP , Publisher of Specialized in Office365 / Microsoft Exchange / Virtualization , Sathesh is an Messaging Expert supporting/Designing/Deploying many medium size businesses to large enterprises when it comes to Corporate messaging and Virtualization Infrastructure

Check Also

Connecting Azure Express Route with Multiple Virtual Networks

Unlike a traditional hub and spoke when you have site to site VPN with azure …


  1. Hi

    I dont get the Get-TeamChannelUser cmlet available. How do I make it avaialble for the script to run?

  2. I also got the error with missing ‘Get-TeamChannelUser’ command. I followed the guide to install this but still got the error. It’s worth mentoning that you have to may close PS and reconnect to Teams. The new module should then recognize the Get-TeamChannelUser as a valid command.

  3. why use Add-Member in the code?

Leave a Reply

Your email address will not be published.