Provision Multiple Microsoft Teams using Microsoft Excel and PowerShell


The script below provides the ability to create a Microsoft Team using Microsoft Teams PowerShell Module.  You must install the latest version of the module from PowerShell Gallery.  The script uses an Excel file as input.  For Authentication you have the option to use Azure Active Directory App (Preview) with certificate authentication or simply cloud based authentication using local credentials.  

You must login to Azure Active Directory to create the Azure Active Directory Application inside preview.  Then create a self signed certificate and upload that to Azure AD App.  You can then use the thumbprint to connect to Microsoft Teams Module.  You must also specify the Current user as Owner as App based auth requires at least one Team Owner.

You can install both the Modules using the script below.

Install-Module ImportExcel -Force -Verbose
Install-Module MicrosoftTeams -Force –Verbose

You can test the ExcelImport module using the basic script below.

$ImportPath = “C:\temp\CreateTeam-Basic.xlsx”
$Teams = Import-Excel -Path $ImportPath -WorksheetName “Teams”
$Owers = Import-Excel -Path $ImportPath -WorksheetName “Owners”
$Members = Import-Excel -Path $ImportPath -WorksheetName “Members”
$Channels = Import-Excel -Path $ImportPath -WorksheetName “Channels”
$Tabs = Import-Excel -Path $ImportPath -WorksheetName “Tabs”

image

https://gallery.technet.microsoft.com/Provision-Multiple-Teams-4ef05794