Hi @IBN
First you may need to prepare a csv file which contains Owner, Class Type, Team Name and Members.
For example it may look like:
Then connect to Teams Powershell and run the following script:
$Teams = import-csv C:\Scripts\Teams\bulk.csv
Foreach($Team in $Teams)
{
$Group = New-Team -DisplayName $Team.TeamName -Owner $Team.Owner -Visibility $Team.Type
$Members = $Team.Members.Split(",")
Foreach($Member in $Members)
{
Add-TeamUser -GroupId $Group.GroupId -User $Member
}
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.