Teams 2.1 with FSLogix setup guide

UPDATES: The Teams Install script included has been updated to address what happens if you run it when an update is already in place, and also it will install the Teams Outlook Add-in as needed.

With the new Teams 2.1, Microsoft is changing the package method for deploying it, and this requires a new FSLogix hotfix, and method to get it working in your environment. The following is the outline of everything that I have done to make this work in a Server 2022 environment. Currently Server 2019 is not supported for Hotfix 3, so don’t expect this to work in that environment. Also with Server 2022 I recommend NOT using ODT and full profiles in FSLogix. I recommend just using full profiles with either VHDLocation or CloudCache.

FSLogix Hotfix Version

The current Hotfix that is supported for Server 2022 is available here.

Make sure to read the release notes on this version so that you are using the supported Operating Systems.

Group Policy

Under your user configuration, you will want to prevent Teams from auto-starting whenever you update the base image. However your maintenance machine should NOT have this feature on it, as it will prevent updates during update cycles.

Under the Computer Configuration you will need to enable the installation of Appx Packages, utilized a new Redirections.xml which we will cover later, and also enable trusted app installations.

And finally under Computer Configuration – Preferences – Registry, enable the websocket services for msedgewebview2.exe. And also disable the Auto Update of Teams if you are working with a non-persistent image where you control the installation of new Teams 2.1 versions.

FSLogix Redirections.xml

If you are using my previous example redirections.xml, you need to remove some folders for Teams 2.1 to work. Not just under the Exclusion list, but also under the Common Folders compiled number at the top of the definition. Here is an example of an optimized redirections.xml I use that keeps profiles small, and still keeps Teams running.

<?xml version="1.0" encoding="UTF-8"?>
<FrxProfileFolderRedirection ExcludeCommonFolders="25">

    <Exclude Copy="0">Saved Games</Exclude>
    <Exclude Copy="0">Tracing</Exclude>
    <Exclude Copy="0">AppData\Local\ConnectedDevicesPlatform</Exclude>
    <Exclude Copy="0">AppData\Local\Downloaded Installations</Exclude>
    <Exclude Copy="0">AppData\Local\assembly</Exclude>
    <Exclude Copy="0">AppData\Local\CEF</Exclude>
    <Exclude Copy="0">AppData\Local\Comms</Exclude>
    <Exclude Copy="0">AppData\Local\Deployment</Exclude>
    <Exclude Copy="0">AppData\Local\FSLogix</Exclude>
    <Exclude Copy="0">AppData\Local\GroupPolicy</Exclude>
    <Exclude Copy="0">AppData\Local\Sun</Exclude>
    <Exclude Copy="0">AppData\Local\Temp</Exclude>
    <Exclude Copy="0">AppData\Local\VirtualStore</Exclude>
    <Exclude Copy="0">AppData\Local\CrashDumps</Exclude>
    <Exclude Copy="0">AppData\Local\Package Cache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Office\16.0\PowerQuery</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\TokenBroker\Cache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Notifications</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Internet Explorer\DOMStore</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Internet Explorer\Recovery</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\MSOIdentityCRL\Tracing</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Messenger</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Terminal Server Client</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\UEV</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\Application Shortcuts</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\Mail</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\WebCache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\WebCache.old</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\AppCache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\Explorer</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\DNTException</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\IECompatCache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\iecompatuaCache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\Notifications</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\PRICache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\PrivacIE</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\RoamingTiles</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\SchCache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\Temporary Internet Files</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Windows\0030</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Media Player</Exclude>
    <Exclude Copy="0">AppData\Local\webex</Exclude>
    <Exclude Copy="0">AppData\Local\Google\Chrome\</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Edge\User Data\Default\Service Worker</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Edge\User Data\Default\Cache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Edge\User Data\Default\Code Cache</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Edge\User Data\Default\blob_storage</Exclude>
    <Exclude Copy="0">AppData\Local\Google\Chrome\User Data\Default\Service Worker</Exclude>
    <Exclude Copy="0">AppData\Local\Google\Chrome\User Data\Default\Cache</Exclude>
    <Exclude Copy="0">AppData\Local\Google\Chrome\User Data\Default\Code Cache</Exclude>
    <Exclude Copy="0">AppData\Roaming\com.adobe.formscentral.FormsCentralForAcrobat</Exclude>
    <Exclude Copy="0">AppData\Roaming\Adobe\Acrobat\DC</Exclude>
    <Exclude Copy="0">AppData\Roaming\Adobe\SLData</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Document Building Blocks</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Windows\Network Shortcuts</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Windows\Printer Shortcuts</Exclude>
    <Exclude Copy="0">AppData\Roaming\Sun\Java\Deployment\cache</Exclude>
    <Exclude Copy="0">AppData\Roaming\Sun\Java\Deployment\log</Exclude>
    <Exclude Copy="0">AppData\Roaming\Sun\Java\Deployment\tmp</Exclude>
    <Exclude Copy="0">AppData\Roaming\Sun\Java\Deployment\tmp</Exclude>
    <Exclude Copy="0">AppData\Roaming\ICAClient\Cache</Exclude>
    <Exclude Copy="0">AppData\Roaming\Macromedia\Flash Player\\support\flashplayer\sys\</Exclude>
    <Exclude Copy="0">AppData\Roaming\Macromedia\Flash Player\\support\flashplayer\flashplayer\#SharedObjects\</Exclude>
    <Exclude Copy="2">AppData\Roaming\Zoom</Exclude>
    <Exclude Copy="0">AppData\Local\Microsoft\Teams\Packages\SquirrelTemp</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Service Worker\CacheStorage</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Application Cache</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Cache</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Code Cache</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft Teams\Logs</Exclude>
    <Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Media-Stack</Exclude>    
    <Exclude Copy="0">AppData\Local\Microsoft\OneNote\16.0\cache\tmp</Exclude> 
    <Exclude Copy="0">AppData\Local\CiscoSparkLauncher</Exclude> 
    <Exclude Copy="0">AppData\Local\OneLaunch</Exclude> 
    <Exclude Copy="0">AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs</Exclude> 
    <Exclude Copy="0">AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\PerfLogs</Exclude> 
    <Exclude Copy="0">AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\EBWebView\WV2Profile_tfw\WebStorage</Exclude> 

    <Include>AppData\Local\Google\Chrome\User Data</Include>


Teams 2.1 installation

After digging into Teams 2.1, it’s update and install process, and the Outlook Add-in install, I have created a PowerShell Script that will do the necessary install for you for all users. It can install Teams 2.1 if it isn’t installed, and it can update Teams 2.1 and the Outlook Add-in as well as those are updated.

# Script created by Jeff Riechers
# Downloaded from
# Contact me with questions or recommendations at

#Teams 2.x Install
Start-Transcript -Path (Join-Path $env:TEMP "Updates.log") -Append -Force
#Teams 2.x Install
$Teams2InstallPath = "C:\Program Files\WindowsApps\MSTeams_*"
If(!(test-path -PathType container $Teams2InstallPath)) {
Write-output "Teams 2.x not installed, downloading the latest bootstrapper.exe and installing now"
	$Teams2DownloadURI = ""
	$Teams2Path = Join-Path "$($env:TEMP)" "teamsbootstrapper.exe"
	Write-Output "Starting download of latest Teams 2.x client"
	(New-Object System.Net.WebClient).DownloadFile($Teams2DownloadURI, $Teams2Path)
	$Execute2Setup = " -p"
	$Team2Installproc = Start-Process -FilePath $Teams2Path -ArgumentList $Execute2Setup -PassThru
	Start-Sleep -Seconds 60
else {
Write-Output "Teams already installed proceeding to check for updates."

$CurrentTeamsDirectoryCount = ((Get-ChildItem -Path "C:\Program Files\WindowsApps" -Filter "MSTeams_*" -Directory).Fullname).Count
$CurrentTeams = (Get-ChildItem -Path "C:\Program Files\WindowsApps" -Filter "MSTeams_*" -Directory).Fullname | sort name | select -First 1
$updateprocess = Start-Process -FilePath "$env:localappdata\Microsoft\WindowsApps\ms-teams.exe" -PassThru
Start-Sleep -Seconds 60
$stopteams = Stop-Process -name "ms-teams"
$UpdatedTeamsDirectoryCount = ((Get-ChildItem -Path "C:\Program Files\WindowsApps" -Filter "MSTeams_*" -Directory).Fullname).Count
if ($UpdatedTeamsDirectoryCount -gt $CurrentTeamsDirectoryCount) {
	Write-Output "Updating Teams"
	Start-Sleep -Seconds 60
	$updateprocess = Start-Process -FilePath "$env:localappdata\Microsoft\WindowsApps\ms-teams.exe" -WindowStyle Minimized -PassThru
	Start-Sleep -Seconds 60
	$stopteams = Stop-Process -name "ms-teams"
	$UpdatedTeams = (Get-ChildItem -Path "C:\Program Files\WindowsApps" -Filter "MSTeams_*" -Directory).Fullname | sort name | select -First 1
else {
Write-Output "There are no new Teams 2.x updates available."

# Teams Outlook Meeting Add-in Install and Update
# Remove current Teams add-in
Uninstall-Package -Name "Microsoft Teams Meeting Add-in for Microsoft Office" -Force
Start-Sleep -Seconds 15

# Install latest Teams Meeting Add-in
$UpdatedTeams = (Get-ChildItem -Path "C:\Program Files\WindowsApps" -Filter "MSTeams_*" -Directory).Fullname | sort name | select -First 1
$installableversion = Get-AppLockerFileInformation -Path $UpdatedTeams"\MICROSOFTTEAMSMEETINGADDININSTALLER.MSI" | Select -ExpandProperty Publisher | select BinaryVersion
$getversionnumber = $installableversion.BinaryVersion.toString()
$TeamsAddinInstall = start-process -filepath "C:\Windows\System32\msiexec.exe"-argumentList '/i MicrosoftTeamsMeetingAddinInstaller.msi /qn ALLUSERS=1 /norestart TARGETDIR="C:\Program Files (x86)\Microsoft\TeamsMeetingAddin\',$getversionnumber,'"' -WorkingDirectory $UpdatedTeams -Passthru

If you are going to execute this as part of your maintenance machine process, make sure that the machine does not have Teams updates blocked, as it will prevent ANY updates from taking place on the image.

Block Teams Auto-Launch with Published Applications

One big problem is that if you are using the same image for Desktops that you use for Published Applications, you will get Teams launching with your published app. The launch mechanism for these UWP apps doesn’t use Run or Startup keys, instead they are read from HKEY_Current_User\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\. I believe Citrix is working on a mechanism to block these, but for now you can block Teams by modifying this entry.

HKEY_Current_User\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask

Change State to 1 and Teams won’t auto launch.

I use WEM in my environments to continually reset this variable, to prevent any future updates or user configurations from resetting it back to 2.

If users DO want Teams to launch when they get into a Desktop, just create a shortcut in their %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup folder to “C:\Program Files\WindowsApps\MSTeams_24033.811.2738.2546_x64__8wekyb3d8bbwe\ms-teams.exe”

So someone pointed out that the Program Files\WindowsApps path is not accessible from regular users, so you don’t want to use that path for launching Teams. Instead make a shortcut to %userprofile%\AppData\Local\Microsoft\WindowsApps\ms-teams.exe in their %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Join the Conversation


  1. Good start, man. Thanks for sharing this. I am curious about something, though: how is the Outlook Plugin experience? No classic teams in the mix, just new Teams. I noticed on W10 and W11, for example, that the Teams plugin says “Sign In.” You click it, and all it does is bring up Teams 2.1. Almost like the plugin now redirects it to the UI of Teams 2.1. Curious about what you see here in regard to that?

    1. I didn’t see that in my 2022 multi-session instance where I tested. Could be some of the new interactions they are doing with updated Outlook. Was this in old outlook, or new outlook?

      1. Good writeup. I’ve just found this page after doing the same journey. Regarding the Meeting Plugin I install it separately after the Teams installation is done. Still using good old cmd-file though so you’ll need to convert to PS. I also remove the current installations before adding the new ones (Master Image):

        echo Uninstalling existing New Teams…
        pushd %~dp0
        teamsbootstrapper.exe -x
        reg delete HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\Teams /f
        echo Uninstalling existing New Teams Outlook Meeting Add-in…
        for /f “tokens=2*” %%A in (
        ‘reg query “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” /s /f “Microsoft Teams Meeting Add-in” 2^>nul ^| findstr “DisplayName”‘
        ) do ( for /f “delims=” %%P in (‘reg query “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” /s /f “%%B” 2^>nul ^| findstr “HKEY_LOCAL_MACHINE”‘) do (
        for /f “tokens=2*” %%X in ( ‘reg query “%%P” /v “UninstallString” 2^>nul ^|findstr “UninstallString” ^|findstr “MsiExec.exe”‘ ) do (
        set MsiStr=%%Y
        set MsiStr=!MsiStr:/I=/X!
        !MsiStr! /quiet /norestart )))
        echo Installing New Teams…
        REM 64-bit Teams
        teamsbootstrapper.exe -p -o “%~dp0MSTeams-x64.msix”
        REG ADD HKLM\SOFTWARE\WOW6432Node\Citrix\WebSocketService /v ProcessWhitelist /t REG_Multi_SZ /d msedgewebview2.exe /f
        REG ADD HKLM\SOFTWARE\Microsoft\Teams /v disableAutoUpdate /t REG_DWORD /d 1 /f
        echo New Teams Updated!
        echo Installing New Teams Meeting Add-in…
        FOR /F %%F IN (‘powershell.exe -noninteractive -command “(Get-AppxPackage -Name “MSTeams”).PackageFullName”‘) DO SET build=%%F
        FOR /F %%G IN (‘powershell.exe -noninteractive -command “(Get-AppLockerFileInformation -Path ‘C:\Program Files\WindowsApps\%build%\MICROSOFTTEAMSMEETINGADDININSTALLER.MSI’ | Select -ExpandProperty Publisher | select BinaryVersion | ft -HideTableHeaders)”‘) DO SET version=%%G
        msiexec /i “C:\Program Files\WindowsApps\%build%\MicrosoftTeamsMeetingAddinInstaller.msi” ALLUSERS=1 /qn /norestart TARGETDIR=”C:\Program Files (x86)\Microsoft\TeamsMeetingAddin\%version%\”

  2. Nice blog. I take it Server 2019 is the only server-based OS that needs the DISM install method. I know the FSLogix HF3 won’t work, I recall an a post about HF4 on request. But really just wondering on 2022 install

    It looks like 2022 takes the .teamsbootstrapper—p, like W10 or W11, is that correct?

  3. Can you please add the command line used to publish the new Teams 2.1 as seamless published application.

    1. Hi Charles. I work for CDW, so if you have a current Account Executive with CDW they can get you to our engineers. If you don’t have an Account Executive, let me know and I can get you access to one to get started.

  4. Hi Jeff, very good description. After several test runs and careful consideration and implementation through this article with our colleagues, unfortunately there is still the problem with the new Teams 2.1. Teams cannot be executed after these steps! Or, cannot be started. The problem is the FSLogix 2210 hotfix 3 (2.9.8784.63912) itself. As soon as theFSlogix service is stopped and you log in again, the new Teams opens! All colleagues and community users who use OS 2022 and Fslogix have EXACTLY the same problem! Microsoft seems to be really messing up here. I don’t understand that this has been known for 4 months and Microsoft offers no approaches for a fix or other solutions!

    1. Interesting, I have not seen this issue. I have a large environment that is using Teams 2.1 with FSLogix 3 on 2022 without issue. Are you using profile containers, or Office containers? Do you have the GPO settings and Redirections.xml set as I outlined in the article?

      1. Hello Jeff, Yes, this was implemented 1:1 and everything was checked again by our colleagues in collaboration. We use Citrix LTSR 2203 Cu3 with profile containers. We can recreate it again and again. Once Fslogix is finished, it works directly.

  5. Hello Jeff,
    I follows your steps and applied it on our Vmware Non-persistent desktop and using fslogix profile containers.
    Teams is working at first but after a day or two (new session), nothing happens when opening the teams from start menu and it doesnt start automatically as well. No error message or logs on even viewer.
    The only way for it to work again is by opening the ms-teams.exe from \AppData\Local\Microsoft\WindowsApps\ms-teams.exe

    This will fixed the issue but I’m not sure why this is happening.

      1. Yes, teams update are disabled

        We also tried to update it to current version but issue still persist. the issue happens randomly, like after multiple session within a day or after a new session on the next day.

        we also checked the profile containers of our users and everything seems to be in placed, data are preserved.

        for now, we just created a shorcut for the link \AppData\Local\Microsoft\WindowsApps\ms-teams.exe to our golden image so users are still able to open teams if it doesnt auto start or unable to open it from start menu or pinned taskbar

        1. That is the preferred location, as it hooks to whatever the current installed version of Teams is. You may want to disable the auto-start I defined above, and instead put that shortcut in the user’s personal startup.

          1. Thanks Jeff for the reply, im confuse on the last part
            “You may want to disable the auto-start I defined above, and instead put that shortcut in the user’s personal startup.”

            do i have to do it on every users? we have more than 800 users utilizing our instant clones.

          2. I disable it via GPO for published apps. But if you are just publishing a desktop and want it to run for everyone, and let them choose to adjust the startup, just don’t delete that entry.

    1. I do the reg change via GPO personally. But you only need to adjust that if you are doing published apps and don’t want it showing up for everyone. If you are running just desktops you don’t even have to worry about it.

  6. Thank you for putting this script together. I have found that it works well but the issue I have after the install, I have 2 shortcuts to new teams in the start menu. Any idea why that would happen?

    1. I haven’t seen that happen before. I have seen the pinned to the top of the start menu as new item. I wonder if Teams 2 is installed in the user profile before this install takes place?

  7. Good morning Jeff,

    Great Article.
    I am working on a non-persistent horizon view master image.
    your script runs and installs Teams fine. I do not think it installs the outlook add-in and it fails with the following error:

    Windows PowerShell transcript start
    Start time: 20240426152123
    Username: MASTER1\Admin
    RunAs User: MASTER1\Admin
    Configuration Name:
    Machine: MASTER1 (Microsoft Windows NT 10.0.19045.0)
    Host Application: powershell
    Process ID: 7560
    PSVersion: 5.1.19041.4291
    PSEdition: Desktop
    PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.4291
    BuildVersion: 10.0.19041.4291
    CLRVersion: 4.0.30319.42000
    WSManStackVersion: 3.0
    PSRemotingProtocolVersion: 2.3
    Transcript started, output file is C:\Users\Admin\AppData\Local\Temp\Updates.log
    Teams 2.x not installed, downloading the latest bootstrapper.exe and installing now
    Starting download of latest Teams 2.x client
    PS>TerminatingError(Start-Process): “This command cannot be run due to the error: Access is denied.”
    Start-Process : This command cannot be run due to the error: Access is denied.
    At C:\NewTools\Teams New\Teams2Install.ps1:31 char:18
    + … teprocess = Start-Process -FilePath $CurrentTeams”\ms-teams.exe” -Win …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
    Start-Process : This command cannot be run due to the error: Access is denied.

    can you help me identify what I am doing wrong please?

    Thank you.

  8. Just an FYI ..
    I am running the script in Admin mode.
    I disabled the Reg Key to disable Teams.

    1. It looks like something is preventing the PowerShell script from executing the external processes. I wonder if you have some hardening in the image that prevents PowerShell from executing.

      1. Thank you, Jeff, I am not able to confirm yet if it is some sort of hardening, but I am able to execute few other PowerShell scripts.
        Let me do some digging, and I will give you an update.
        Thank you

Leave a comment

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