Almost a year ago, I wrote a blog post on how to configure Microsoft Teams application settings using Configuration Manager and Powershell. For good measures, find this post in the link below:
Not too long ago, I started getting some reports on, that Teams is no longer picking up the changes made to the config.json and that Teams is hanging at the loading screen. I initially tried to reproduce, but was unable to.
I decided to invest some more time into the issue, and ended up being able to reproduce and find the cause. In the process of troubleshooting, I decided to try and move this into Proactive Remediations in Microsoft Endpoint Manager as well. The result made up this blog post.
Below a quick illustration of running the solution manually. The detection script detects that Microsoft Teams needs its settings configured, and the configure script carries out the configuration.
Most of the nifty details on how Microsoft Teams stores its settings in a config.json file, is explained in details in my previous blog post. Those details still apply.
The script is now split in 2 parts. One for detection and one for remediation.
The scripts supports modifying following settings in Microsoft Teams:
- Auto-start application
- Open application in background
- On close, keep the application running
- Disable GPU hardware acceleration
- Register Teams as the chat app for Office
- Application language
- Application theme
Find the Detect-TeamsAppSettings script on my GitHub page: Powershell/Detect-TeamsAppSettings.ps1 at master · imabdk/Powershell (github.com)
This script detects if Microsoft Teams is configured as desired, and will exit with either exit code 1 (not configured as desired) or exit code 0 (configured as desired).
Modify the param region to suit your environment.
Example: If you want to configure Microsoft Teams to be running with Danish UI, Dark theme as well as having the application to start with Windows in the background, go ahead configure the parameters similar to below illustration:
Find the Configure-TeamsAppSettings script on my GitHub page: Powershell/Configure-TeamsAppSettings.ps1 at master · imabdk/Powershell (github.com)
This script stops the Teams process and makes the necessary changes to the Teams config.json. It’s required to stop the Teams process, as well as to delete a cookie file, in order to successfully apply the changes to the config.json.
OBS: Make sure to configure the param region, so it matches that of the detection script. Otherwise, you will never see a happy status in Proactive Remediations and the remediation script will run again and again.
Microsoft Endpoint Manager
Head into the Microsoft Endpoint Manager admin center: https://endpoint.microsoft.com
And locate the Proactive Remediations feature within the Reports -> Endpoint Analytics blade:
Use the 2 scripts explained above and as illustrated below:
Assign the scripts to run on a group consisting of devices or users. In this scenario, I’m running the scripts Hourly on a group containing my own devices.
OBS: Remember that the remediation script stops and starts the Teams process. This is a thing to consider, when assigning a schedule. You don’t want to end up in a scenario, where the Teams process is stopped every hour for your users.
Taking a closer look on IntuneManagementExtension.log (C:\ProgramData\Microsoft\IntuneManagementExtension\Logs) you will see if the detection script finds that settings needs to be configured:
If so, the remediation script will kick off and make the relevant changes:
With the script of configuring Microsoft Teams now being separated into 2, using this with Compliance Settings (Configuration Item and Baseline) in Configuration Manager is pretty straightforward. For the completeness of this, I might do a blog post on how to set this up in the near furture.
When done, then I’ve shown how to configure Microsoft Teams using a regular package (ConfigMgr), using Compliance Settings (ConfigMgr) and with this post, using Intune as well.