Managing Microsof Teams workloads using PowerShell

Managing Microsof Teams workloads using PowerShell

2019, Apr 26    

There’s no doubt Microsoft Teams is being adopted worldwide as a standard in enterprise collaboration streams, and also that is particularly not easy to keep it clean and sorted as the number of teams grows, especially public ones.

PowerShell surely will do a good job here, so let’s try it


Install Microsoft Teams PowerShell Module

Opened PowerShell console as administrator, and installed required module

Install-Module -Name MicrosoftTeams

Install Microsoft Teams PowerShell Module

Checking for availability and commands list

Get-Module -Name MicrosoftTeams
Get-TeamHelp

Check for availability

For now a bit limited, but surely will be improved next versions


Connecting to Microsoft Teams tenant

Connect-MicrosoftTeams -Account id user@company.com

Connecting to Microsoft Teams tenant


Creating Team and add users

Very very easy…firstly, creation of the test team

$group = New-Team -DisplayName "string_name" -Visibility "public or private"

Creating new Microsoft Team

Checking created Team

Adding users (you’ve got it; can be scripted!!)

Add-TeamUser -GroupId $group.GroupID -User user@company.com

Adding users to the Team

Checking results


Adding Channels

Also one liner…so to be scripted!!

New-TeamChannel -GroupID $group.GroupID -DisplayName "String_name" -Description "String_Description"

Adding Channels

Checking results


Conclusion

Having in mind this is the first release of the module, I think major commandlets are here, so Microsoft Teams admins will appreciate it to keep their environment clean and sorted. Also, I’m sure this won’t be the last version, so thinking in near future, to improve processes and tasks automation (for example on new comers to company) this kind of tooling is something to use on a daily basis.