I was wondering if someone can help me with the following script. I want the script to tell me the following:
Tell me all the MS Teams that a user is a member of (this is currently working).
I want to see all the Private MS Team channels of each group.
Example: MS Team Sport
Channel “Soccer” - Private Channel
Channel “Tennis” - Private Channel
Channel “Football” - Public Channel
and so on…
It would be nice if we can put this in an excel document. I wrote a similar script to find Displayname, SMTAddress, and Sharepoint site previously which works, but this would be an add-on.
Without having experiences with or access to Exchange Online and Teams I could imagine that something similar to the following code snippet could meet your requirements. At least it may inspire you of how to move forward.
It is a common way to collect properties from different sources inside a loop and combining them in one [PSCustomObject].
If you want to have the ouput in an Excel sheet you should urgently take a look at the great module from Doug Finke ImportExcel.
Since I don’t have any experience with teams administration I don’t know if the Get-Team outputs something what Get-TeamChannel takes in by pipeline as -GroupID and how the output of Get-TeamChannel would look like … sorry.
On top of that I don’t know what relation the output of Get-UnifiedGroup and Get-TeamChannel would have.