Many companies have made the transfer to Microsoft 365, and many others have been planning emigrate to the cloud platform. However because the COVID-19 pandemic transforms how individuals work and from the place they work, some corporations accelerated their Microsoft 365 migration plans. So, it’s not shocking that Microsoft has not too long ago reported an uptick in companies using Microsoft Teams, which is an integral a part of Microsoft 365. Microsoft makes it simple to handle Teams via its devoted admin heart portal. However in the event you’re an IT administrator who likes to roll up your sleeves and fireplace up PowerShell to knock off a bunch of day by day duties quickly and effectively, why not use your scripting expertise to handle Microsoft Teams.
Putting in the Microsoft Teams PowerShell module
This tip on the way to handle Microsoft Teams with PowerShell involves us courtesy of Teams guru Anthony Bartolo, a senior cloud advocate for Microsoft. To get the ball rolling, launch PowerShell as an administrator and start by putting in the Microsoft Teams PowerShell module:
Set up-Module -Title MicrosoftTeams
Relying in your system, chances are you’ll be requested by PowerShell to permit it to put in some extra packages and modules. Subsequent, log in to your Teams tenant with this cmdlet:
Observe: You’ll be able to all the time get a listing of PowerShell Microsoft Teams cmdlets by typing Get-TeamHelp.
The cmdlets you’ll in all probability be utilizing essentially the most are:
- New-Workforce (creates a brand new Workforce)
- Take away-Workforce (erases a Workforce)
- Add-teamuser (provides a person to an present Workforce)
- Take away-teamuser (removes a person from an present Workforce)
Manage Microsoft Teams with PowerShell: Pattern script
There are a number of duties you possibly can accomplish utilizing PowerShell to handle Microsoft Teams. Right here’s a script from Bartolo permitting you to assign customized insurance policies to a person or a number of customers:
$group = Get-AzureADGroup -SearchString "Human Resources group" $members = Get-AzureADGroupMember -ObjectId $group.ObjectId -All $true | The place-Object $members | ForEach-Object
What does the script do? Bartolo explains it on Microsoft’s ITOps Talk Blog, the place he notes that the script “assigns the Human Resources Management Policy to all users in the Human Resources group. The script begins by getting the GroupObjectId of the group. Once acquired, it then finds the members of that group and assigns the policy to all users in the group.” You’ll be able to easily alter his script on your functions.
Extra Teams sources
Bartolo’s script is only one instance of how you should utilize PowerShell to handle Microsoft Teams. For many who want to handle Microsoft Teams through the Teams admin heart portal as an alternative of PowerShell, TechGenix’s Amy Babinchak has some data on configuring Teams here and here. Brien Posey has two wonderful tutorials: setting up access for Microsoft Teams guest users and, to make your communications sound higher, using the Microsoft Teams call quality dashboard. And don’t miss Sukesh Mudrakola’s useful article the place he seems to be at top Teams features to improve work collaboration.
Featured picture: Shutterstock
Extra PowerShell Fundamentals articles