10 Comments

Microsoft is forcing its customers to switch to the "new Teams" by mid-2024! The feedback so far is that customers are once again beta testers, and extensive tests have not even been carried out by Microsoft. There are problems with Microsoft FSLogix and the Outlook add-in. The "new Teams" on a Server 2019 or Server 2022 is yet another challenge. I have developed a Powershell scripts that installs Teams on Server 2022, Server 2019, Windows 10 and Windows 11 multiuser and also takes the Outlook add-in into account. 

The Teams installation itself is simple, but also requires the installation of the EdgeWebView Runtime version and does not necessarily make the entire installation with registration values etc. easy. Considering this, I have explicitly created a Powershell script for the installation of the new Teams on VDI systems. 

Let's start with FSLogix and the fact that FSLogix Profile is the best option and Office Container or FSLogix Profile together with Office Container leads to problems with the "new Teams". Microsoft has released a first version of FSLogix in this regard, which should fix some of the problems with the "new Teams". The following paths should be specified as exceptions for FSLogix:

<!--Microsoft New Teams-->
<Exclude>AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs</Exclude>
<Exclude>AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLog</Exclude>
<Exclude>AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage</Exclude>
<Exclude>AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\GPUCache</Exclude>

Unfortunately, Microsoft has only half-heartedly renewed Teams and so the installation comes as an MSIX package, but includes an MSI package for the Teams Outlook Add-in. This leads to problems on Server 2022 and much is written about it, but no solution yet! After a long analysis of the problem on Server 2022, I realized that Server 2022 has .NET 6.x enabled by default. The "compatibility" of versions is such a thing, and so I simply activated .NET 3.x on Server 2022 and only then was the add-in loaded properly.
Server 2019 needs a different approach and additional components. The script for 2019 downloads all required media and the reason you need free internet access.

In order for the loading to work at all, Outlook must be "forced" to do so via the following registry values:

HKCU\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect
LoadBehavior REG_DWORD = 0x00000003

HKCU\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect
Description REG_SZ = Microsoft Teams Meeting Add-in for Microsoft Office

HKCU\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect
FriendlyName REG_SZ = Microsoft Teams Meeting Add-in for Microsoft Office

HKCU\Software\Microsoft\Office\16.0\Outlook\Resiliency\DoNotDisableAddinList
TeamsAddin.FastConnect REG_DWORD = 0x00000001

However, the Teams Add-In should also be installed manually so that it is loaded centrally for all users and is not located in the user's profile. Considering this, the Teams auto-update should be deactivated. The manual installation also requires the version of the add-in so that there are no problems with subsequent updates. All these points are considered by the script.

 

Citrix Virtual Channel

For the new Teams to be fully functional, the following paths must also be added to the Virtual channel allow list in a Citrix policy:

  • MSTEAMS,C:\Program Files\WindowsApps\MSTeams*8wekyb3d8bbwe\ms-teams.exe
  • MSTEAM1,C:\Program Files\WindowsApps\MSTeams*8wekyb3d8bbwe\ms-teams.exe
  • MSTEAM2,C:\Program Files\WindowsApps\MSTeams*8wekyb3d8bbwe\ms-teams.exe

 

Shortcut for the new Teams

Creating a shortcut for the new teams is pretty simple, by using msteams:/ as location. Basically, this is a URL shortcut.

New teams shortcut in Windows start menu

The shortcut in the start menu can be removed, by editing the MSIX package. You only have to add AppListEntry="none" in the manifest file. You edit the teams MSIX package with the MSIX Packing Tool, but you have to sign it with your own certificate when saving the file.

Teams shortcut not in Windows start menu

It can happen that the Teams shortcut does not appear in the start menu. This is a bug which can be fixed by the following exclusion
AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\TempState

 

Switching from Teams Classic to Teams new

Teams Classic is simply uninstalled on the server, and then the new Teams is installed using a script. However, the problem is the user profiles that still contain components of Teams Classic. This can lead to various problems and should therefore be cleaned up directly when logging in. To accomplish this, execute the following Powershell commands:

Remove-Item -Path "HKCU:Software\Classes\ms-teams" -Recurse -Force
Remove-Item -Path "HKCU:Software\Classes\msteams" -Recurse -Force
Remove-Item -Path "HKCU:Software\Classes\CLSID\{00425F68-FFC1-445F-8EDF-EF78B84BA1C7}" -Recurse -Force
Remove-Item -Path "HKCU:Software\Classes\CLSID\{d1b22d3d-8585-53a6-acb3-0e803c7e8d2a}" -Recurse -Force
Remove-Item -Path "HKCU:Software\Classes\TeamsURL" -Recurse -Force
Remove-Item -Path "HKCU:Software\Classes\WOW6432Node\CLSID\{00425F68-FFC1-445F-8EDF-EF78B84BA1C7}" -Recurse -Force
Remove-Item -Path "HKCU:Software\Classes\WOW6432Node\CLSID\{409667f8-3eb8-4181-1c94-941bd33cdfad}" -Recurse -Force

Remove-Item -Path "$env:USERPROFILE\AppData\Roaming\Microsoft\Teams" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\AppData\Local\Microsoft\TeamsMeetingAddin" -Recurse -Force

 

Complete scripts on Github

For Windows Server 2022, Windows 10 and Windows 11 multiuser
https://github.com/Koetzing/Powershell-Scripts/blob/main/install-new-teams.ps1

For Windows Server 2019
https://github.com/Koetzing/Powershell-Scripts/blob/main/install-new-teams-srv2019.ps1 

 

Write comments...
or post as a guest
People in conversation:
Loading comment... The comment will be refreshed after 00:00.
  • This commment is unpublished.
    Eric · 6 months ago
    Hi Thomas
    nice script

    just having a doubt about subsequent update of new teams client ? since you enforce the disablement of auto-update during the install 
    how would that happened?
    • This commment is unpublished.
      Eric · 6 months ago
      @Thomas Kötzing thanks for the prompt response :) 
      i hear you and fully agree on the update process in a case scenario of prod VDI env :)
      my case scenario is slightly different since that env (win server 2019 multi OS, published desktop) is only setup & use as a Disaster Recovery environment e.g barely in use :) so that's why i'm quite keen at letting it teams do his auto update to avoid me the patching headaches
      can you share the link to that PS script you are referring to ?
      thanks
      Eric
    • This commment is unpublished.
      Thomas Kötzing · 6 months ago
      @Eric Hi Eric,
      firstly, disabling the update is required because you don't want to automatically update teams when users are working in production. You should control when updates happen!
      Next, disabling the update is just a registry value, that you can change at any time, for instance when updating teams.
      Then another problem, depending on the companies Microsoft tenant, you might get a different teams update than others!
      Therefore, I have created another PowerShell script, that enables teams updates and then triggers the teams update process. This then would only work, when you are logged in at the same time with Microsoft, so the update knows your tenant.
      The whole teams update, it's so not ready for VDI environments, if you ask me.
  • This commment is unpublished.
    Jürgen · 6 months ago
    Hi Thomas, 

    thanks for the script that worked without problems on our Citrix Servers

    two Problems:
    - for some reason there is no shortcut in the start menu
    - tried to modify the GPO to create the shortcut as described (msteams:/), but when I launch the program appears the message "this internet connection cannot be opend, the protocol "msteams" isn't connected with any registered program (translated from German message :-))

    any ideas?

    kind regards,

    Jürgen
    • This commment is unpublished.
      Jürgen · 6 months ago
      @Thomas Kötzing Hi Thomas,

      the teams version ist installed correctly on the servers. When I login with a new profile everything works correctly (also the Outlook Add-in is loading, before it doesn't). So it seems that the problem is caused by old folders/file in the user profile and/or registry entries. Try to find a solution without re-creating the profiles.
    • This commment is unpublished.
      Thomas Kötzing · 6 months ago
      @Jürgen >thanks for the script that worked without problems on our Citrix Servers
      Well, seams like it did not run without problems....

      Both issues tell me that teams are not installed or not installed correctly. Check that it shows in the installed applications.

      >translated from German message
      I am a German, no need to translate.
  • This commment is unpublished.
    Bryan McNally · 6 months ago
    Will this work for Amazon WorkSpaces which runs on either Server 2019 or Server 2022? 
  • This commment is unpublished.
    DNY · 6 months ago
    what a terrible package, it's working except i cant get rid of the shortcut in startmenu,  edit teh package didn't work, any options? we are using ivanti workspace control, tricks to hide the shortcut?

    • This commment is unpublished.
      Thomas Kötzing · 6 months ago
      @DNY I don't write about stuff, that I haven't done myself. Editing the MSIX packages does work, but you have to do it in the right way.
      Important things editing the teams msix package:
      - You must sign it with your own signing certificate
      - The signing certificate must be trusted by the system
      - You must increase the version number
      - You must NOT use the teams teamsbootstrapper with your own package
      - I used the free MSIXTroubleshooter

      I tried FSLogix to hide teams but didn't work for the start menu.

  • This commment is unpublished.
    Brian · 7 months ago
    How can I tell if I am using the TEAMS for VDI app?

    This is what is displays in the about App, there is no mention of VDI

    Version
    You have Microsoft Teams version 24033.811.2738.2546.
    Issue occurred while checking for updates. Citrix HDX Optimized.
    The client version is 49/24031414718.

    • This commment is unpublished.
      Thomas Kötzing · 7 months ago
      @Brian The new Microsoft Teams supports VDI/DaaS since version 2.1 (2023)
      There is no specific „Teams for VDI“ version.
      You are using version 2.4
  • This commment is unpublished.
    Simon · 5 months ago
    Hi Thomas

    Thank you very much for the amazing script.

    I tested it on a Server 2019 where Teams Classic was previously installed.

    The installation worked correctly, and everything proceeded smoothly after logging in with a test user. However, after about 2 minutes, the server restarted without warning. I was a bit puzzled but attributed it to my own mistake.

    After the next login with the test user, it took about 2 minutes again before the server automatically restarted.
    In the Event Log, I found entries indicating that the Windows Installer initiated a restart.

    The entries appeared as follows, from top to bottom:

    Beginning a Windows Installer transaction: {A7AB73A3-CB10-4AA5-9D38-6AEFFBDE4C91}. Client Process Id: 13812.

    Product: Microsoft Teams Meeting Add-in for Microsoft Office -- Configuration completed successfully.

    Windows Installer reconfigured the product. Product Name: Microsoft Teams Meeting Add-in for Microsoft Office. Product Version: 1.24.13006. Product Language: 1033. Manufacturer: Microsoft. Reconfiguration success or error status: 0.

    Windows Installer requires a system restart. Product Name: Microsoft Teams Meeting Add-in for Microsoft Office. Product Version: 1.24.13006. Product Language: 1033. Manufacturer: Microsoft. Type of System Restart: 1. Reason for Restart: 1.

    Ending a Windows Installer transaction: {A7AB73A3-CB10-4AA5-9D38-6AEFFBDE4C91}. Client Process Id: 13812.

    Event ID 1005, msinstaller: The Windows Installer initiated a system restart to complete or continue the configuration of 'Microsoft Teams Meeting Add-in for Microsoft Office'.

    After the third login, nothing happened.

    I deleted the profile of the testuser and logged in again. After 2 minutes, the server restarted again.
    I assume that the restart is triggered for every user. I cannot roll it out this way :-)

    Have you ever encountered this phenomenon?

    Thank you
    Simon
    • This commment is unpublished.
      Beer · 3 months ago
      @Simon Have you ever found a sollution for this restart. I have the same issue!
    • This commment is unpublished.
      Beer · 3 months ago
      @Simon Have you ever found a sollution for this restart. I have the same issue!
    • This commment is unpublished.
      Jens Bonde · 3 months ago
      @Simon Are you using Trend?
    • This commment is unpublished.
      Simon · 5 months ago
      @Thomas Kötzing Thanks for the response.
      Too bad, so i will continue to look for the error.
    • This commment is unpublished.
      Thomas Kötzing · 5 months ago
      @Simon >Have you ever encountered this phenomenon?
      No, and it doesn't make sense because the Teams Add-in does not require a reboot, at least with the version I tested.

      Thomas
  • This commment is unpublished.
    Jürgen · 2 months ago
    Hi Thomas,

    thanks for the script! I used it a few months ago without issues on our Citrix Farm (Win 2022, Citrix Virtual Apps & Desktop 2203 LTSR). I would like to update the new Teams version on the server to the latest version. Should I run the script again or is there something to consider? Kind regards, Jürgen
    • This commment is unpublished.
      Thomas Kötzing · 2 months ago
      @Jürgen I have created an update script version for 2019/2022 but they are different and haven’t fully tested the scripts yet. 2022 triggers the teams upgrade process and 2019 installs the updated teams. When I’m back from vacation, I will offer the scripts to volunteers.
  • This commment is unpublished.
    Patrick van Stijn · 5 months ago
    Hi Thomas, 

    thanks for the script.

    When installing the new teams on a Citrix VDA Windows server 2019, we are nog getting the presence in outlook to work properly.
    The installation is accordingly to Microsoft learn, but still we don't get it to work.

    Has anyone else got this issue?

  • This commment is unpublished.
    Danny · 7 months ago
    Nice scripts, but how to prevent the autoupdate, reg key is not working in server 2022. Teams Client shows Update message and that is not working because it's Citrix
    • This commment is unpublished.
      Geert · 7 months ago
      @Thomas Kötzing That is correct. I had this issue within Citrix because I ran Teams once before applying the disable autoupdate key. The update prompt kept appearing for the test account until I cleaned the FSLogix profile.
    • This commment is unpublished.
      Thomas Kötzing · 7 months ago
      @Danny Hi Danny,
      I had the message too, but at the end it was old teams stuff in the profile. With a fresh profile, I didn't get the update message. Clean out old directories etc. from the users' profile and check again.
  • This commment is unpublished.
    Patrik · 1 months ago
    Danke Thomas!

    Saved me a lot of headache. 

    What a crazy convoluted and unstable application / installation routine.