Forum Discussion
MariusPretorius
Nov 25, 2020Iron Contributor
Teams Admin: Creating Bulk Class Teams using PowerShell and a CSV file
For Your Information: I have successfully created Class Teams using PowerShell and a CSV file. This is very handy because you can have a whole list of teams, channels, teachers and students in a CSV ...
MariusPretorius
Apr 26, 2021Iron Contributor
Note: this format requires you to give the path to the CSV file when you run the function from the PowerShell command line. E.g.
New-TeamsFromCSV c:\powershell\NewTeams.csv #substitute with your path and filename.
- VinodS2020Sep 13, 2021Brass ContributorHi, I am not able to create teams bulk via above given commands , please see below error which I am getting
New-TeamsFromCSV -Path "C:\Users\username\bulkteamscreation.csv"
New-TeamsFromCSV : The term 'New-TeamsFromCSV' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-TeamsFromCSV -Path "C:\Users\username\bulkteamscreation.csv"
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-TeamsFromCSV:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException - Nikos_MAug 22, 2021Copper Contributor
Hi,
thank you for your excellent script
Unforunatelly i am getting the following error
SpoilerNew-Team : Error occurred while executing Code: BadRequest Message: Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000 x-operationid: e33aa8f7bcaaf2409469a733f43c4d56 x-telemetryid: 00-e33aa8f7bcaaf2409469a733f43c4d56-2d04028de3c0164f-00 X-MSEdge-Ref: Ref A: 78BB7E144EAC4317B3AC67C206C16AB8 Ref B: LON21EDGE1113 Ref C: 2021-08-22T15:51:03Z Date: Sun, 22 Aug 2021 15:51:02 GMT , ErrorMessage : {"errors":[{"message":"Team Visibility must be one of known types: [Private,Public,HiddenMembership].","errorCode":"Unknown"}],"operationId":"e33aa8f7bcaaf2409469a733f43c4d56"} InnerError: RequestId: 415e5729-033a-4532-b76c-0524e12c9ddd DateTimeStamp: 2021-08-22T15:51:03 HttpStatusCode: BadRequest At C:\365\classes\CreateMsTeamsComprehensive.psm1:104 char:30 + ... $group = New-Team -MailNickName $team.TeamsName -displayname $tea ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SyntaxError: (Microsoft.Teams...Cmdlets.NewTeam:NewTeam) [New-Team], ApiException + FullyQualifiedErrorId : Team creation failed.,Microsoft.Teams.PowerShell.TeamsCmdlets.NewTeam- cedriczeiterAug 24, 2021Copper Contributor
Nikos_M Did you find any solution to the issue? I ran into the same error-message.
Seems like we have to add a Team-Visibility Column to the CSV file.