Use PowerShell To Manage Microsoft Teams


The above image may not mean much to many users, but to those responsible for ICT administration it will be very welcome – a way to use PowerShell to easily automate the deployment and management of Microsoft Teams.

The addition of 23 cmdlets in PowerShell to manage Teams was announced at the end of November in this official blog post, however there is a great technical “how to” guide that is worth reading here:

Microsoft Teams PowerShell Support

Some of the ideas from the blog post about how PowerShell can be used include:

  • Automatically provision new teams, new channels within the team, add members and set options such as a picture, and member permissions.
  • Create a self-service tool that uses PowerShell on the back-end to make creating teams easy for end-users but with controls for IT. For example, a user browses to a website form to create a team. PowerShell can check for a team that has a duplicate name, to ensure users aren’t creating teams with the same name. I see this as one simple example but is powerful when we start to think about governance we can provide to the business on Microsoft Teams.
  • If I need to add a large number of members to a team, using PowerShell I can add those members in bulk from a .csv
  • Standardize settings within each team that is created.

Schools can still use the Student Data Sync to populate Teams but may find PowerShell a more efficient way to do so.

Why This Matters:

The student population in schools is constantly changing and at a classroom level this is even more pronounced at the start of a year. Students may be enrolled in a class, change their mind before the semester starts (or even shortly after), and be gone and into a new class before the teacher even realizes.

Having the ability to keep your students accurately enrolled into the correct Team for Education for their corresponding classes is critical and many school ICT administrators would choose to use AzureAD groups as the source of authority for the correct classes a student should be in. This is because many Student Management Systems (SMS) have an automated export or synchronisation with Active Directory. Consequently, using PowerShell to keep your students correctly enrolled into Teams is as simple as querying AzureAD and matching students.

From a teacher’s perspective, this is important because it means they need to spend no time checking if students are correctly enrolled into their Team and able to access important class resources and engage in online conversations with their fellow students.  PowerShell allows for a “set and forget” approach to scripting routine tasks like enrolling / unenrolling students from their respective Teams and ultimately, this makes life easier for everyone.

I am always keen to discuss what I've written and hear your ideas so leave a reply here...

%d bloggers like this: