SOLVED

Creating Private Channels from a CSV file

%3CLINGO-SUB%20id%3D%22lingo-sub-1480717%22%20slang%3D%22en-US%22%3ECreating%20Private%20Channels%20from%20a%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1480717%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3EI%20have%20existing%20teams%20that%20I'd%20like%20to%20create%20plus%20thirty%20private%20channels%20for.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20these%20private%20channel%20names%20in%20a%20CSV%20file%20with%20headers%20such%20as%3A%3C%2FP%3E%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3Ecname%3C%2FTD%3E%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3Ectype%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20height%3D%2230px%22%3EGroup%20001%3C%2FTD%3E%3CTD%20height%3D%2230px%22%3EPrivate%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20using%20this%20code%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EImport-csv%20-path%20%22C%3A%5Cxxxx%22%20%7C%20foreach%7BNew-TeamChannel%20-GroupId%20GROUPID%20-DisplayName%20%24_.cname%20-MembershipType%20%24_.ctype%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20the%20error%20that%20keeps%20being%20return%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ENew-TeamChannel%20%3A%20A%20parameter%20cannot%20be%20found%20that%20matches%20parameter%20name%20'MembershipType'.%0AAt%20line%3A1%20char%3A159%0A%2B%20...%20-4f95-af21-868941f09af1%20-DisplayName%20%24_.cname%20-MembershipType%20%24_.ctyp%20...%0A%2B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20~~~~~~~~~~~~~~~%0A%20%20%20%20%2B%20CategoryInfo%20%20%20%20%20%20%20%20%20%20%3A%20InvalidArgument%3A%20(%3A)%20%5BNew-TeamChannel%5D%2C%20ParameterBindingException%0A%20%20%20%20%2B%20FullyQualifiedErrorId%20%3A%20NamedParameterNotFound%2CMicrosoft.TeamsCmdlets.PowerShell.Custom.NewTeamChannel%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20Please%20can%20someone%20assist%20me%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1480717%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ecsv%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPrivate%20Channels%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1481180%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20Private%20Channels%20from%20a%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1481180%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20need%20the%20BETA%20version%20of%20the%20Teams%20module%20for%20that%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.poshtestgallery.com%2Fpackages%2FMicrosoftTeams%2F1.0.24%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.poshtestgallery.com%2Fpackages%2FMicrosoftTeams%2F1.0.24%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1741721%22%20slang%3D%22fr-FR%22%3ERe%3A%20Creating%20Private%20Channels%20from%20a%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1741721%22%20slang%3D%22fr-FR%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EI%20understood%20that%20the%20beta%20version%20no%20longer%20exists%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CEM%3E%22They%20are%20moving%20it%20to%20the%20%22production%22%20PSGallery%2C%20it%20was%20announced%20in%20a%20blog%20post%20a%20while%20back.%22%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Foffice-365%2Funable-to-install-microsoftteams-powershell-preview-module%2Fm-p%2F1566842%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Foffice-365%2Funable-to-install-microsoftteams-powershell-preview-module%2Fm-p%2F1566842%3C%2FA%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EI%20have%20version%201.1.6%20which%20is%20installed%20and%20cannot%20use%20the%20%3C%2FSTRONG%3E-MembershipType%20Private%20parameter%3CSTRONG%3E%20with%20%3C%2FSTRONG%3EGet-TeamChannel%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LionelPS_0-1601718330304.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F223889iCC33A652B5A8A180%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22LionelPS_0-1601718330304.png%22%20alt%3D%22LionelPS_0-1601718330304.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EWith%20version%201.0.22%20of%20poshtestgallery.com%20everything%20worked%20fine%20but%20it%20no%20longer%20works%20with%201.1.6%20of%20PSGallery%3C%2FSTRONG%3E%3CBR%20%2F%3E%3A(%3C%2Fimg%3E%3C%2FP%3E%3CP%3EWhat%20to%20do%3F%201.0.22%20is%20no%20longer%20available%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1781927%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20Private%20Channels%20from%20a%20CSV%20file%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1781927%22%20slang%3D%22en-US%22%3ESame%20issue%20here.%3C%2FLINGO-BODY%3E
Highlighted
New 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
Highlighted
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

Highlighted

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

 

Highlighted
Same issue here.