Microsoft Teams – Deploying Teams at Scale

Microsoft Teams : Deploying Teams at scale (image courtesy - Microsoft)
Microsoft Teams : Deploying Teams at scale (image courtesy - Microsoft)

Hi All,

Greetings for the day!!!

Today discussing new feature related to Microsoft Teams – We could deploy multiple teams at a time in our Tenant and add / remove multiple users at a time to the team

This feature is useful when we need to create multiple teams at a time in our Tenant

Details

  • Now, we can create maximum 500 teams at a time with PowerShell
  • We can also add maximum 25 users at a time to a Team
  • We have an also option to add / remove users from existing multiple teams at a time
  • We have an option to set user as either Owner / Member to the team
  • We have an option to select standard template or our custom template
  • We will get an email notification for Teams creation completion / errors if any
  • Team owners and members will be automatically notified
    fig : Microsoft Teams : Deploying Teams at scale
    fig : Microsoft Teams : Deploying Teams at scale (image courtesy – Microsoft)

    STEP 1 – Prepare Teams CSV file

    • We need to create CSV file with team details which we need create with following columns
        Column nameDescription
        Team NameName of the Team
        Existing Team IDThis is require in case we are adding / removing users from existing team. Existing Team ID
        VisibilityPublic OR
        Private
        Team Template IDTemplate ID. This is not required field. If we need to create Team with standard template we can keep this field blank
        Table 1 : CSV file for Teams creation

        fig : Microsoft Teams : Deploying Teams at scale - Teams CSV file
        fig : Microsoft Teams : Deploying Teams at scale – Teams CSV file

        STEP 2 – Prepare Users CSV file

        • We need to create CSV file with users details which we need to add / remove with following columns
          Column nameDescription
          User Full NameUser display name
          User UPN or IDUser principal name (UPN) or ID
          Team NameTeam name
          ActionTypeAddMember OR
          RemoveMember
          Owner or MemberOwner OR
          Member
          Table 2 : CSV file for user details which we need to add / remove

          fig : Microsoft Teams : Deploying Teams at scale - Users CSV file
          fig : Microsoft Teams : Deploying Teams at scale – Users CSV file

          STEP 3 – PowerShell script

          Connect-MicrosoftTeams

          • Once we are connected to Microsoft Teams, we are ready to create Teams
          • We have PowerShell CMDLET – New-CsBatchTeamsDeployment
          PS C:\> New-CsBatchTeamsDeployment -TeamsFilePath 
                     'C:\Prasham\Articles\Teams\deployteamsatscale\teams.csv' 
                 -UsersFilePath 
                     'C:\Prasham\Articles\Teams\deployteamsatscale\USERS.csv' 
                 -UsersToNotify "prasham@knowledgejunction1.onmicrosoft.com"  
          
          Output - 
          
          The deployment job has been submitted. OrchestrationID: 1.wjp.3271ab97-c3bb-491d-b3f3-0aff1014187c.d0a0524c-e6f6-4252-b261-8e240c1a0222

          fig : Microsoft Teams : Deploying Teams at scale - executing CMDLET - New-CsBatchTeamsDeployment - creating teams at scale and adding users
          fig : Microsoft Teams : Deploying Teams at scale – executing CMDLET – New-CsBatchTeamsDeployment – creating teams at scale and adding users
          • This is batch job, it get submitted.
          • We can check the status of our teams creation with CMDLET – Get-CsBatchTeamsDeploymentStatus
          PS C:\> Get-CsBatchTeamsDeploymentStatus -OrchestrationId 1.wjp.3271ab97-c3bb-491d-b3f3-0aff1014187c.d0a0524c-e6f6-4252-b261-8e240c1a0222
          
          
          Output will be - 
          Completed

          fig : Microsoft Teams : Deploying Teams at scale - executing CMDLET - Get-CsBatchTeamsDeploymentStatus - knowing the teams creation status
          fig : Microsoft Teams : Deploying Teams at scale – executing CMDLET – Get-CsBatchTeamsDeploymentStatus – knowing the teams creation status

          Following image shows the list of Teams created now

          fig : Microsoft Teams : Deploying Teams at scale
          fig : Microsoft Teams : Deploying Teams at scale – 3 Teams created successfully

          Following image show team “SPREAD HAPPINESS TEAM” created with owner – ThirdUser and shown in above Teams CSV file

          fig : Microsoft Teams : Deploying Teams at scale
          fig : Microsoft Teams : Deploying Teams at scale – SPREAD HAPPINESS TEAM created successfully – ThirdUser is owner

          Complete PowerShell script

          PS C:\> Connect-MicrosoftTeams
          
          Account                                    Environment Tenant                               TenantId                    -------                                    ----------- ------                               --------                    prasham@knowledgejunction1.onmicrosoft.com AzureCloud  6b38e1c3-a1fe-40cc-8b93-a4159a50592c 6b38e1c3-a1fe-40cc-8b93-...     
                                                                                                                                                                                                                                                      PS C:\> New-CsBatchTeamsDeployment -TeamsFilePath 
                   'C:\Prasham\Articles\Teams\deployteamsatscale\teams.csv'  
                  -UsersFilePath 
                      'C:\Prasham\Articles\Teams\deployteamsatscale\USERS.csv' 
          
          -UsersToNotify "prasham@knowledgejunction1.onmicrosoft.com"  
          
          The deployment job has been submitted. OrchestrationID: 1.wjp.3271ab97-c3bb-491d-b3f3-0aff1014187c.d0a0524c-e6f6-4252-b261-8e240c1a0222
          
          PS C:\> Get-CsBatchTeamsDeploymentStatus -OrchestrationId 1.wjp.3271ab97-c3bb-491d-b3f3-0aff1014187c.d0a0524c-e6f6-4252-b261-8e240c1a0222
          Completed
          PS C:\>
          

          fig : Microsoft Teams : Deploying Teams at scale - complete PowerShell script
          fig : Microsoft Teams : Deploying Teams at scale – complete PowerShell script

          REFERENCES

          Thanks for reading the article !! Please feel free to discuss in case any issues / suggestions / thoughts / questions !

          HAVE A GREAT TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂

          Prasham Sabadra

          LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

          You may also like...

          This site uses Akismet to reduce spam. Learn how your comment data is processed.

          %d bloggers like this: