SOLVED

Creating Private Channels from a CSV file

Copper Contributor

Hi all,

I have existing teams that I'd like to create plus thirty private channels for.

 

I have these private channel names in a CSV file with headers such as:

cnamectype
Group 001Private

 

I tried using this code: 

 

 

Import-csv -path "C:\xxxx" | foreach{New-TeamChannel -GroupId GROUPID -DisplayName $_.cname -MembershipType $_.ctype}

 

 

However, the error that keeps being return is:

 

 

New-TeamChannel : A parameter cannot be found that matches parameter name 'MembershipType'.
At line:1 char:159
+ ... -4f95-af21-868941f09af1 -DisplayName $_.cname -MembershipType $_.ctyp ...
+                                                   ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-TeamChannel], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.TeamsCmdlets.PowerShell.Custom.NewTeamChannel

 

 

  Please can someone assist me here.

3 Replies
best response confirmed by ThereseSolimeno (Microsoft)
Solution

You need the BETA version of the Teams module for that: https://www.poshtestgallery.com/packages/MicrosoftTeams/1.0.24

Hello @Vasil Michev 

 

I understood that the beta version no longer exists

"They are moving it to the "production" PSGallery, it was announced in a blog post a while back."

https://techcommunity.microsoft.com/t5/office-365/unable-to-install-microsoftteams-powershell-previe...

 

I have version 1.1.6 which is installed and cannot use the -MembershipType Private parameter with Get-TeamChannel

 

LionelPS_0-1601718330304.png

 

With version 1.0.22 of poshtestgallery.com everything worked fine but it no longer works with 1.1.6 of PSGallery
:(

What to do ? 1.0.22 is no longer available

 

Thank

 

Same issue here.
1 best response

Accepted Solutions
best response confirmed by ThereseSolimeno (Microsoft)