How to re-enable Teams auto-update in Windows 365

Microsoft

In some Windows 365 Cloud PCs, the ability for the installed Teams client to automatically update has been affected along with the ability to check for updates. To rectify the problem, Teams Machine Wide Installer and the Teams client must be uninstalled, and then reinstalled.  

Reinstalling Teams can be a difficult task to accomplish if one doesn’t wish to disturb end users at work. Further complicating the matter is that the Teams client automatically installs only on user logon.

To lower the complexity of fixing the problem while not impacting end users, we have written a Proactive Remediation package that takes end users into account. 

More information on Proactive Remediation 

Link to the Teams Fix - Proactive Remediation Package 

The detection script is checking to see if the Teams client is installed in the Users’ profile, which exists under c:\users\[user name]\appdata\local\Microsoft\Teams. If it is not found there, it will return non-compliant.  

The remediation script first checks to see if it has successfully run to completion before. If it has not, it then checks to see if a user is logged in and in an inactive state. If the user is logged in and active, the script exits, and Proactive Remediation will try again later.  If the user is not logged in or active, the remediation process begins.  

The remediation script downloads the latest version of the Teams Machine Wide Installer MSI, uninstalls the Teams client, uninstalls the existing Machine Wide Installer installation, checks for a Registry Key than can cause issues with Teams client installations, then checks the user state again. If the user is not logged into their Cloud PC, the script will return compliant. Once the user logs back into their Cloud PC, the Machine Wide Installer will trigger the Teams client installation automatically.  

If the user is logged in but inactive, the remediation script creates a child PowerShell script, and XML file used to create a scheduled task, and registers the scheduled task that will initiate the Teams client installation when the user reconnects to their Cloud PC. All files are downloaded to C:\Windows\Temp. 

PavithraThiruvengadam_0-1654886407387.png

 

The amount of time that the scheduled task stays active is configurable in the Remediation script by modifying the $DateOffset variable. 

PavithraThiruvengadam_1-1654886407389.png

 

The child script checks for the existence of files it is supposed to remove, and this is done to ensure that the Teams client isn’t reinstalled every time the user connects. If the files exist, the script assumes it hasn’t successfully run before and launches the Teams client installer. Once the installation is complete, the script will attempt to delete the scheduled task. If the user doesn’t have administrative rights, it will not be able to remove the scheduled task and it will expire at its given time. The script will then remove the files used in this process.  

If the user does not reconnect to their Cloud PC by the time the scheduled task expires, the remediation script will run again and recreate the scheduled task. 

All the scripts in this solution generate their own logs to help admins troubleshoot issues. These logs are all written to C:\Windows\Temp. These logs are: 

Detection Script - Teams-MWI-detect.log 

Remediation Script - Teams-MWI-remediate.log 

Child Remediation Script - Teams-MWI-remediate-child.log 

 

The remediation script automates the whole process but if you want to manually fix this issue, you can do so by following these steps:

  1. On the Cloud PC, navigate to Settings > App > Apps and features.
  2. Search for Microsoft Teams.
  3. Uninstall Microsoft Teams and Teams Machine-Wide Installer.
  4. Download the latest version of Microsoft Teams from here
  5. Open a command prompt and install the Teams client using the following command: msiexec.exe /I %Filepath to the downloaded Teams MSI% ALLUSERS=1
  6. Restart the Cloud PC. The Teams client is now installed with automatic updates turned on.

 

2 Replies

Hi @Pavithra Thiruvengadam!

 

We are still encountering this issue (Teams MWI installed to Program Files with ALLUSER=1) on our Win 11 gallery images in July, one month after this post was made.

 

When will the Win 11 gallery image come with Teams MWI installed using ALLUSERS=1 to go in the user profile? How can we tell which version of a gallery image we are getting when we deploy a new Cloud PC? Right now we are remediating this ourselves with our own Intune solution, but of course we would like to not have to run extra remediation steps that increase overall provisioning time.

 

Thanks!

 

Carlos

Just tested and works for me, please confirm if worked for others.

Thanks!