This script will create a team, add owner(s), add coaches as members, and add 1-99 channels formatted as "Team 01…Team 99".
- Open PowerShell as Admin
- In the command window, run the following command
- Note: When running, you will be asked to accept changes to the execution policy. Please respond with Yes or Yes to All to all prompts.
- Open PowerShell as Admin
- In the command window, run the following command:
Install-Module -Name MicrosoftTeams
- Open your PowerShell editor of choice (e.g. Visual Code, PowerShell IDE, etc.)
- Open the script: Teams Automation.ps1
- Set the variables according to your OH needs. (See the "Variables Examples" below.)
Variable | Description | Examples |
---|---|---|
teamName | The name of the Team, NOT the name of the channels |
|
teamDescription | The purpose of the team, for everyone to see | "OpenHack channel for attendees and coaches to collaborate" |
teamVisibility | Allows the team to be hidden or discoverable |
|
teamOwnerOverride | Allows you to specify someone else's email alias (i.e. you are creating a team for someone else to own). When left blank, the script will add the person running the script as the default owner. |
|
numOfTeams | The number of channels to create based on the number of teams you expect | 1 - 99 |
admins | Adds the array of email aliases specified as Owners of the Team. Specify them as strings that are comma delimited. |
|
coaches | Adds the array of email aliases specified as Members of the Team. Specify them as strings that are comma delimited. |
|
- Save changes and run the script
When creating the team for the first time, the SDK is throwing an error as shown. Run the script again and say "Y" to continue working with the found team.