Listing all private channels and owners

New Contributor

I would like to get a list of all private channels and their owners, is there a way to do it?



3 Replies



Hello @Youness022  

Did this quickly, it can be improved but it does what you want




$Teams = Get-Team

foreach($team in $teams){

$PrivateChannel=Get-TeamChannel -MembershipType private -GroupId $team.groupId

Write-Host "Private Channel: " $privateChannel.displayName

$owner=Get-TeamChannelUser -Role owner -GroupId $team.groupId -DisplayName $privateChannel.displayName

Write-Host "Owner: " $owner.Name



What version are you using for Teams PowerShell?
Hello, last GA one 4.2.0

Let me recommend to keep track of them :)