In this blog, post, I will show you how to view all the channels inside a Microsoft Teams Team using PowerShell.
Connect
The first step in this process will be to connect to Microsoft Teams using the following cmdlet.
Connect-MicrosoftTeams
Get GroupId
Once connected, we need to find the GroupId value of the Team we would like to get a list of all the channels.
To find the GroupId value, I will run the following cmdlet.
From the list, I will copy the GroupId value.
Get-Team
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2020/04/040920_2218_GetListOfMi1.png)
Get Channels
To get the list of all the channels, I will run the following cmdlet with the GroupId value.
Get-TeamChannel -GroupId GROUPID
To export to CSV, I will use the following cmdlet.
get-teamChannel -GroupId GROUPID | export-csv file.csv