Microsoft Teams is now generally available for Office 365 customers, and for those of you who are planning to use it you may be looking for a way to deploy the Teams client to your user’s computers.
The Microsoft Teams desktop client installer is available for Windows, Mac, and mobile devices.
- The Mac installer and the Windows setup.exe installer are available from Microsoft here. The Windows setup.exe package has basic command-line switches for silent install and uninstall. You can script the install and use GPO to deploy the package, which I’ll demonstrate later in this article.
- An MSI package for Windows is also available in x86 and x64 versions. This package is suitable for GPO and SCCM deployment, but works a little differently than the setup.exe package, as you’ll see in the demonstration below.
Whichever method you use to deploy Teams, the installer runs in the context of the logged on user, and installs to the %userprofile%\AppData\Local\Microsoft\Teams folder. As you’ll see in the comments on this blog post below, this isn’t ideal for some environments for a variety of reasons.
Teams is a self-updating application. It will check for, and download, any available updates each time the user runs the program. That makes it simple to maintain (as long as you allow it to self-update), and means that deploying Teams is basically a task of running the installer once, and then not running it again. If you block Teams from self-updating, Microsoft warns that your Teams experience will likely degrade and you’ll miss out on new features and performance improvements that are released.
Preparing to Deploy Microsoft Teams
Before you deploy the Teams client you should verify that Teams in your Office 365 tenant is configured the way you want it. Teams configuration is demonstrated in my Getting Started with Microsoft Teams article.
Although Teams is included with eligible Office 365 plans, it can be enabled and disabled on a per-user basis. If you have had Teams disabled during the preview phase, now is the time to turn it back on. For my demonstration environment I’m using Azure AD group-based license management, and have an Active Directory group that is configured to enable the Teams option for users’ licenses. Helpfully, that also means I have a security group already in place that I can target my Group Policy to.
Download the Microsoft Teams installer using the links above, and place the files on a network share that users and computers can read from. For this demonstration, the installer will be running from the path \\mgmt\installs\MicrosoftTeams.
If you deploy an old package, the Teams application will self-update automatically. However, you should keep your deployment share updated on a regular basis with the latest install packages to save time.
Deploying Teams via Script or Group Policy using the Setup.exe Package
The Teams setup.exe installer has command-line switches for silent deployment. For example, to silently install Microsoft Teams, the following command line can be used:
C:\temp\> Teams_windows_x64.exe -s
To silently uninstall Teams, the following command line can be used:
C:\temp\> %userprofile%\AppData\Local\Microsoft\Teams\Update.exe" --uninstall -s
Any deployment script for the setup.exe package needs to run in the context of the user. A logon script assigned by Group Policy meets that requirement. So with a little scripting logic you can check for the existence of the Teams application in the user’s AppData folder, and run or not run the installer depending on the results.
As a side note, when Teams is uninstalled it leaves the Update.exe file in place. So checking for Update.exe in your script logic will give misleading results. Instead, you can check for the existence of a folder named “.dead”, which is placed in the application folder when Teams is uninstalled. For my deployment script which I’m sharing here, I’ve checked for “.dead”, and if found, will run the Teams installer again.
Create a Group Policy that assigns a logon script to run the Install-MicrosoftTeams.ps1 PowerShell script, and provide the -SourcePath as a script parameter.
If you are filtering the GPO to a specific security group, remember to also add Authenticated Users to the Delegation tab of the Group Policy and grant them Read (but not Apply) permissions.
At next Group Policy refresh and logon the Teams client will silently install for the user, and place a Microsoft Teams icon on their desktop.
Deploying Teams via Group Policy using the MSI Package
The MSI package for Teams behaves a little differently than the setup.exe package. The MSI package installs the Teams Installer on the computer, placing it in the Program Files or Program Files (x86) folder, depending on which architecture you deploy. The Teams Installer will then run automatically for new users logging on to the computer, and install Teams to their %userprofile%\AppData\Local\Microsoft\Teams folder.
Create a Group Policy and add the Teams MSI package to the Computer Configuration as an assigned application.
Note that if you’ve previously deployed Teams using the setup.exe package, or the user has previously installed Teams themselves, and then uninstalled Teams later, the Teams installer will not reinstall the application due to the presence of leftover files. Microsoft has provided a cleanup script that you can run to remove the leftover files, and then the Teams installer should be able to successfully install the app for the user.
After Teams has installed, it will automatically launch for the user and prompt them for their sign-in credentials.
Microsoft has provided multiple software packages for Teams so that we can choose the best deployment method for our environment. The MSI is suitable for Group Policy or SCCM deployment, and is also a good way to pre-stage the Teams application on newly deployed computers. The setup.exe package requires additional scripting but can be deployed via GPO or SCCM as well. In either case, the installer is smart enough to detect existing installs, and avoid reinstalling on uninstalled systems. The self-update capability also means that Teams requires very little maintenance over time.
This is an updated version of an article originally published on March 15th, 2017.
Managing Microsoft Teams can be a tricky and complex task if you don’t know the right way to do so. Check out this must-read ‘How to Manage Microsoft Teams: An Admin Guide’ for the essential skills for managing teams effectively.