Procedure for setting up the new Microsoft Teams on the VDI W2022, W2019, W10, and W11 multi-user platform

microsoftteams image

MMicrosoft is forcing its customers to use the „new teams“to switch over—and all by mid-2024! The feedback so far is that customers are once again Beta tester and Microsoft hasn't even conducted extensive testing. For example, there are issues with Microsoft FSLogix and the Outlook add-in. The „new Teams“ is also available on a Server 2019 or Server 2022 is yet another challenge. I've developed a PowerShell script that sets up Teams on Server 2022, Server 2019, Windows 10, and Windows 11 installed in a multi-user environment and the Outlook add-in is also taken into account. 

The Team installation itself is straightforward, but it also requires installing the EdgeWebView Runtime version, and the whole process—involving registry entries and the like—isn't exactly easy. With that in mind, I have specifically chosen to install the new teams on VDI systems, PowerShell scripts were created for the installation.

Let's start with FSLogix and the fact that FSLogix Profiles which is the best option, and whether using Office Containers or FSLogix profiles in combination with Office Containers causes issues with the „new Teams.“ Microsoft has released an initial version of FSLogix to address this issue, which is intended to resolve several issues with the „new Teams.“ The following paths should be specified as exceptions for FSLogix:


AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs
AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLog
AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage
AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\GPUCache

Unfortunately, Microsoft has only made a half-hearted effort to update Teams, so while the installation is provided as an MSIX package, it includes an MSI package for the Teams Outlook add-in. This causes problems on Server 2022, and although there’s been a lot written about it, there hasn’t been a solution—until now! After a long analysis of the problem on Server 2022, I noticed that Server 2022, as Standard .NET 6.x enabled has. Version „compatibility“ is a tricky thing, so I just .NET 3.x It was enabled on the server in 2022, and only then did the add-in load properly.
Server 2019 requires a different approach and additional components. The script for 2019 also downloads all necessary media files at once and therefore requires an internet connection.

However, for the loading to work at all, Outlook must be „forced“ to do so using 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 stored in the user’s profile. With this in mind, Teams’ auto-update feature should also be disabled. The installation also requires the specific version of the add-in to prevent issues with future updates. The script takes all these points into account.

 

Citrix Virtual Channel

To ensure that the new Teams is fully functional, the following paths must also be added to the Approved List for Virtual Channels can be added to 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

 

Link to the new Teams

Creating a shortcut for the new Teams is very easy by msteams:/ is specified as the location. This then becomes a URL link.

Blog Teams Shortcut De

 

New Teams shortcut in the Windows Start menu

You can remove the shortcut from the Start menu by editing the MSIX package. All you need to do is add AppListEntry=“none“ to the manifest file. You can edit the team's MSIX package using the MSIX Packing Tool, but you must sign it with your own certificate when saving the file.

 

Teams shortcut not in the Windows Start menu

The Teams shortcut may not appear in the Start menu. This is a bug and can be fixed by adding the following exclusion
AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\TempState

 

 

Switching from Teams Classic to the new Teams

On the server, simply uninstall Teams Classic and then use a script to install the new version of Teams. The issue, however, is the user profiles, which still contain remnants of Teams Classic. This can lead to various problems and should therefore be resolved immediately upon login. To do this, run 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

 

Full script on GitHub

For Windows Server 2022, Windows 10, and Windows 11 Multi-user
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 

39 thoughts on “Verfahren zur Einrichtung des neuen Microsoft Teams auf VDI W2022, W2019, W10 und W11 Multiuser Plattform”

  1. Hi Thomas, 

    Thank you so much for the notes! 
    Unfortunately, when creating a Teams meeting in Outlook, the message „To schedule a Teams meeting, make sure you're signed in to Teams“ appears, even though Teams is running in the background. 
  2. Marcel Seiler

    Thank you very much.
    If you need to update an existing installation of newMSTeams, uninstall the old version before installing the OutlookMeetingAdd-in. (Line 135)

    $oldversion = try{get-package -Name ‚Microsoft Teams Meeting Add-in*‘ -ea 0}catch{$null}
        if ($oldversion){
            $oldpackage = ($oldversion.FastPackageReference).ToString()
            Start-Process -NoNewWindow -FilePath „msiexec.exe“ -ArgumentList „/X $oldpackage /qn /norestart“ -Wait -ea 0
    start-sleep -Seconds 10 -ErrorAction SilentlyContinue
            }

  3. Hi,

    Microsoft published (or updated?) this post last week: https://learn.microsoft.com/en-us/microsoftteams/troubleshoot/meetings/teams-meeting-add-in-missing

    If you are using the 32-bit version of Office, you must ensure that the scripts load the add-in from x86 or create the registry keys mentioned above in „Wow6432Node“.
    (According to the Borncity Blog, the rollout of Teams 2.0 was also halted today.)
    HTH
    Jan
  4. Thanks for the script.

    I'm currently experiencing an issue in a 2022 RDS environment where the servers automatically restart every few minutes while in operation.
    The log contains the following entry:
    At the request of the user „NT-AUTHORITY\SYSTEM,“ the „msiexec.exe“ process initiated a „restart“ event for the computer „SRV-RDSH-03“ for the following reason: „No title for the reason“
    Error code: „0x80030002“
    Shutdown type: „Restart“
    Note: „Windows Installer has restarted the system to continue or complete the configuration of the „Microsoft Teams Meeting Add-in for Microsoft Office“.“
    Log: System:
    Source: User32
    Event ID 1074
    Does anyone happen to have any information on this?
    If I uninstall the Meeting Add-In, the reboots will stop. 
    It was installed using the V2 script.
    Thank you and best regards
    Thomas
  5. Hello Mr. Kötzing,

    Could it be that something in your script for „Server 2019“ was configured incorrectly? A lot of the content here is duplicated or has only been slightly modified. Also, I can't see the registry values for Outlook in the script… 
    1. The script checks whether .NET 4.8 is installed and whether a restart is pending. This is checked using if statements, which results in duplicate entries—some with .NET, some without, some requiring a restart, and some not…

      >Also, I can't see the registry values for Outlook in the script… 
      As described in the script header: „You must set registry keys for each user to load the Outlook add-in via GPO, WEM, etc.“
      Since these are registry values specific to each user, they cannot be set via the script; instead, they must be configured using GPO, WEM, etc., as described. The necessary keys can be found in this article.

  6. Hi Thomas,

    Thank you so much for these great instructions, but we're still having trouble getting it to work at our company right now 🙂
    We are using an RDS environment with a total of 15 Windows Server 2019 servers in combination with FSLogis profiles. In our test environment, we would like to trial the new (and only the new!) Microsoft Teams client.
    I downloaded your script for W2K19 and ran it. No significant errors occurred, apart from the WebView2 issue, which I attribute to the fact that we had already installed those components manually.
    The client is also available to the user who was logged in during installation, but not once another user logs in to the host. In that case, the client does not appear in the Start menu, nor can it be added via a shortcut using the trick you described.
    So how do you start the client?
    Thanks in advance.
    1. It sounds to me like Teams isn't installed at all. Have you checked the list of installed apps or the AppX folder? If Teams isn't registered properly, the link won't work either. If there’s no Teams link in the Start menu, then Teams is most likely not installed. But for me, that’s like looking into a crystal ball without having seen the system myself.

      However, the script has a timeout to give Teams time to register. I've now increased that value, and the timeout was also missing from a loop. Please download the script again and test it. In any case, it ran without any issues on my W2K19, and Teams is working as it should.
      1. There is a known bug related to this, so as a workaround, exclude the following path:
        AppData\Local\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\TempState

  7. Hi Thomas,

    Thank you very much for the detailed explanation and the script.

    I have a Citrix environment (session-based) running Windows Server 2019 and FSLogix version 2.9.8228.50276. The new version of Teams was installed on a terminal server, and we are currently in the testing phase. The problem I’m having now is that Teams V2 works for two users in the testing phase, but not for three others!

    At first, I thought it was due to the FSLogix version. So I tested the users for whom Teams wouldn't launch without FSLogix (by adding them to the Exclude group). Teams didn't launch automatically, but it was possible to run it manually.

    It now looks like FSLogix needs to be updated. My question for you is: Why does it work for two users in the same environment, but not for the other three?

    Thank you in advance.

    Best regards

    1. I just ran into the same issue with a client, and the latest version of FSLogix (2.9.8884.27471) resolved the problem. By the way, I also posted about it on X, LinkedIn, and Facebook.
      Why is that? Ask Microsoft!

  8. First of all, thank you very much for the helpful guide and script. We use Teams on our Terminal Server 2022, and for the most part, everything is working smoothly. However, we are experiencing the following issues:

    1. Unfortunately, you have to log in again every day, even with FSLogix 2210 Hotfix 4.
    2. Teams closes without warning. Although the Teams icon appears in the taskbar, it disappears as soon as you click on it.
    3. On some days, Teams won't start at all.

    Thank you in advance for your support.
    1. Hello {u-47, Thomas Kötzing},
      At our client's site, which uses RDSH terminal servers running Windows Server 2019, all users have to log in to Teams NEW every day, as Rainer described. If you or anyone else here has any idea what might be causing this, I'd appreciate any tips on how to fix it. 😊

  9. Hi everyone,

    I would like to thank you for your work and for the troubleshooting information you provided.
    We are currently experiencing major issues with Teams New on our terminal servers running Windows 2022.
    Although Teams can be installed on V2 using the script (an error occurs with WebView, but it is already installed on the servers), no user can use Teams in a terminal session after installation because the software closes automatically every time it is launched.
    The problem does not occur in the administrator's console session. Teams remains stable and does not close automatically.
    We're also having issues with the TeamsAddin. Although it's installed, we can't activate it in Outlook. After manually activating it, the add-in deactivates itself automatically.
    We use Outlook 2021 LTSC on our servers.
    Teams and the add-in have already been completely uninstalled and reinstalled several times using the scripts available here.
    Does anyone here have any solutions or tips for us?

    Thank you very much!
    1. The Outlook add-in should be forced to load using the registry keys listed here. Simply assign these to users via GPO.

      Just a quick note: When creating the script, I used a clean Server 2022 installation and created a snapshot of it. I then used that image to install Teams at least 50–80 times via the script and successfully tested it. 
      I can’t account for any additional software that may have been installed, nor can I account for every new version of Teams that Microsoft has released since then. It may also depend on the profile solution used, such as FSLogix, and how it was configured.

  10. First, I had to reset the permissions:
    (Admin CMD)

    icacls „\\?\C:\Program Files\WindowsApps\MSTeams_24335.208.3315.1951_x64__8wekyb3d8bbwe“ /reset /t /c /q
    icacls „\\?\C:\Program Files\WindowsApps\MSTeams_24335.208.3315.1951_x64__8wekyb3d8bbwe“ /grant Users:(RX) /t /c /q
    icacls „\\?\C:\Program Files\WindowsApps\MSTeams_24335.208.3315.1951_x64__8wekyb3d8bbwe“ /grant Users:(OI)(CI)(IO)(GR,GE) /t /c /q
    icacls „\\?\C:\Program Files\WindowsApps\MSTeams_24335.208.3315.1951_x64__8wekyb3d8bbwe“ /grant Administrators:(M) /t /c /q
    1. That's interesting, but the script doesn't change any permissions and hasn't been necessary so far. Also, the script runs with administrative privileges.

  11. Unfortunately, I'm getting the following error when deploying the MSIX :/ 

    Add-AppPackage: Error during deployment. HRESULT: 0x80073CF6, The package could not be registered.
    AppxManifest.xml(1016,10): Error 0x80070032: The package „MSTeams_24335.208.3315.1951_x64__8wekyb3d8bbwe“ cannot be registered due to the following error while registering the „windows.shareTarget“ extension:
    This feature is not supported.
    . Please try again, and contact the package publisher if the problem persists.
    NOTE: For more information, search the event log for [ActivityId] 664edcdc-7258-0002-6b66-4f665872db01, or use the command line Get-AppxLog -ActivityID
    664edcdc-7258-0002-6b66-4f665872db01
    Line: 1 Character: 1
    + Add-AppPackage -Path .\MSTeams-x64.msix
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (D:\script\MSTeams-x64.msix:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId: DeploymentError, Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
    No errors occur within the script 
    1. Just Google „HRESULT: 0x80073CF6“—there are tons of results, and it has to do with the registration of the AppX package. There seems to be a fundamental issue with the system here. I’d recommend checking the event log for the AppX deployment.

  12. 𝟭𝟱𝟲𝟬𝟲 The bug seems to have been fixed since yesterday:   https://statics.teams.cdn.office.net/production-windows-x64/25007.607.3371.8436/MSTeams-x64.msix

  13. Great script for the installation. Is there also a way to uninstall Teams for all users on a terminal server? I have a Server 2019 at a client's site, and since all users have been switched to fat clients for softphones, Teams needs to be removed from the server.

  14. Hello Thomas Kötzing,
    Thank you for your efforts in writing the script.
    This worked wonderfully for us at the end of last year.
    Unfortunately, the update fails during the installation of „new Teams“ with the following error:
    Error: 15617

    The package deployment process is blocked by a policy. Contact your system administrator.

    Unfortunately, even after several hours of research, I still can't find a solution.
    Similarly, attempting to manually uninstall Teams via Windows Settings results in error 0x80073d01.
    Thanks, Microsoft! /s
    Maybe you have an idea?
    Best regards, Sascha
    1. Basically, the script was tested on an empty server running RDS/Citrix. So there’s nothing else on the server—no applications, antivirus software, etc.—and so far, the script has worked for me.
      If it doesn't work for someone, it may be due to additional software or specific settings, such as security settings. 

      Suggestion: Perform error analysis or test on a clean server. Also, there is no „update“ for MSIX packages like Teams New!

      Just typing your error into Google brings up:

      MSIX error code: 0x80073D01
      Description: ERROR_DEPLOYMENT_BLOCKED_BY_POLICY

      Reason: The package deployment operation is blocked by a policy. Contact your system administrator.
      Possible causes:
      – Package deployment is blocked by application control policies.
      – Package deployment is blocked by the “Allow deployment operations in special profiles” policy.

  15. Hello {u-47, Thomas Kötzing},

    Thank you so much for the script! 
    We used it to update an existing Teams V2 installation on our Server 2019 Master. 
    1. Hi Thomas,

      For some reason, my comment got cut off…
      Since the update, Teams hasn't been launching for users. You can see the process in Task Manager, but that's about it. Do you have any ideas about this?
    1. Hi Markus,
      I just haven't tested it on Windows 11 in non-persistent single-session mode. But I can't think of any reason why it wouldn't work.

      Thomas

  16. Thanks so much for the script! Once again, someone’s stepping in to fix something Microsoft completely messed up!
    Updating MSIx packages isn't exactly straightforward. Can the script be used to update the Teams installation?
    1. Yes, version 2.2 of the v2 script can also be used for updates. MSIX packages are not uninstalled, but the Outlook add-in must be uninstalled first, which the script does.

  17. Hello everyone, 

    What's going on with the presence status in Outlook? I'm having issues with it on Server 2019 / Citrix AppLayering / FSLogix / Office 2021.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top