With the new Teams 2.x, Microsoft changed the package method for deploying it from teams 1.x, 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 environment.
I recommend NOT using ODT and full profiles in FSLogix, instead just using full profiles with either VHDLocation or CloudCache.
This updated script now supports installing and updating Server 2019, 2022, and 2025. It also properly sets the permissions on the MSTeams folder under WindowsApps so you no longer have to launch it from a user’s profile. As with my other FSLogix deployments, I recommend running this from an Admin account that has been set to Exclude receiving an FSLogix profile. This will prevent issues when updating FSLogix versions in the future.
FSLogix Hotfix Version
The current FSLogix version is accessible from this permalink. https://aka.ms/fslogix/download
Make sure to read the release notes on this version so that you are using the supported Operating Systems. Also, when updating always update the ADMX and ADML files for control of the new features.
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. This is no longer needed with VDA 2402, but I leave it in for legacy sakes. For the disable Auto-Updates you can move that to your updating and sealing script if your GPOs apply to maintenance and production machines. Or disable it outright as you see below.
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. UPDATE! I have removed AppData\Local\assembly from the exclusion, as this was breaking some Office Add-ins for customers.
Compute the ExcludeCommonFolders number with the following selections.
- 1: Contacts folder
- 2: Desktop folder
- 4: Documents folder
- 8: Downloads folder
- 16: Links folder
- 32: Music folders
- 64: Pictures and Videos folders
- 128: Folders involved in Low Integrity Level processes like AppData\LocalLow
So in my example of 25, this will exclude Links, Download, and Contacts. If you wish to allow users to have Downloads stay persistent, be sure to enable StorageSense to clear out old data. For more info see my article on keeping profiles small.
<?xml version="1.0" encoding="UTF-8"?>
<FrxProfileFolderRedirection ExcludeCommonFolders="25">
<Excludes>
<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\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\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\macromedia.com\support\flashplayer\sys\</Exclude>
<Exclude Copy="0">AppData\Roaming\Macromedia\Flash Player\macromedia.com\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>
</Excludes>
<Includes>
<Include>AppData\LocalLow\Sun\Java\Deployment\security</Include>
<Include>AppData\Local\Google\Chrome\User Data</Include>
</Includes>
</FrxProfileFolderRedirection>
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 www.jeffriechers.com
# Contact me with questions or recommendations at jeffriechers@gmail.com
Start-Transcript -Path (Join-Path $env:TEMP "Updates.log") -Append -Force
#Teams 2.x Install
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Teams" -Name "disableAutoUpdate"
$Teams2InstallPath = "C:\Program Files\WindowsApps\MSTeams_*"
If(!(test-path -PathType container $Teams2InstallPath)) {
$winver = Get-ComputerInfo | select -ExpandProperty WindowsProductName
#2019 Check
If($winver -like "Windows Server 2019*") {
Write-output "Teams 2.x not installed, downloading the latest MSIX package."
New-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows\Appx" -Name "AllowAllTrustedApps" -Value "00000001" -PropertyType DWORD -Force
$Teams2DownloadURI = "https://go.microsoft.com/fwlink/?linkid=2196106"
$Teams2Path = Join-Path "$($env:TEMP)" "MSTeams-x64.msix"
Write-Output "Downloading Now"
(New-Object System.Net.WebClient).DownloadFile($Teams2DownloadURI, $Teams2Path)
$DISM = "c:\windows\system32\Dism.exe"
$Switches = " /Online /Add-ProvisionedAppxPackage /PackagePath:$Teams2Path /SkipLicense"
Write-output "Installing Teams 2 for Windows Server 2019"
$Team2Installproc = Start-Process -FilePath $DISM -ArgumentList $Switches -PassThru
$Team2Installproc.WaitForExit()}
else{
#2022/2025 Install
Write-output "Teams 2.x not installed, downloading the latest bootstrapper.exe"
$Teams2DownloadURI = "https://go.microsoft.com/fwlink/?linkid=2243204&clcid=0x409"
$Teams2Path = Join-Path "$($env:TEMP)" "teamsbootstrapper.exe"
Write-Output "Downloading Now"
(New-Object System.Net.WebClient).DownloadFile($Teams2DownloadURI, $Teams2Path)
$Execute2Setup = " -p"
Write-output "Installing Teams 2 for Windows Server 2022/2025"
$Team2Installproc = Start-Process -FilePath $Teams2Path -ArgumentList $Execute2Setup -PassThru
$Team2Installproc.WaitForExit()
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
Write-Output "Setting Execute permissions on existing WindowsApps MSTeams Foler"
#Add Execute permissions for users to Teams WindowsApps Location
$identity = 'Users'
$rights = 'Execute'
$type = 'Allow'
$inheritance = 'ContainerInherit, ObjectInherit'
$propagate = 'None'
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule($identity, $rights, $inheritance, $propagate, $type)
$acl = Get-Acl -Path $CurrentTeams
$acl.AddAccessRule($ace)
Set-Acl -Path $CurrentTeams -AclObject $acl
Write-Output "Launching Teams to search for updates"
$updateprocess = Start-Process -FilePath $CurrentTeams"\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 "Setting Execute permissions on existing WindowsApps MSTeams Foler"
Write-Output "There is an updated version of teams, launching it to configure it as the new version."
Start-Sleep -Seconds 60
$updateprocess = Start-Process -FilePath $CurrentTeams"\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
#Add Execute permissions for users to Updated Teams WindowsApps Location
$identity = 'Users'
$rights = 'Execute'
$type = 'Allow'
$inheritance = 'ContainerInherit, ObjectInherit'
$propagate = 'None'
$ace = New-Object System.Security.AccessControl.FileSystemAccessRule($identity, $rights, $inheritance, $propagate, $type)
$acl = Get-Acl -Path $UpdatedTeams
$acl.AddAccessRule($ace)
Set-Acl -Path $UpdatedTeams -AclObject $acl
}
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
$TeamsAddinInstall.WaitForExit()
Stop-Transcript
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.
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
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?
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?
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.
echo.
echo Uninstalling existing New Teams Outlook Meeting Add-in…
setlocal ENABLEDELAYEDEXPANSION
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.
echo Installing New Teams…
echo.
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.
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%\”
echo.
echo.
Thanks for the feedback! I will look into adding this if it’s not part of the bootstrapper.
I incorporated your comments into my new script, hopefully it works as well as yours. Thank you again.
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?
Correct. For most of my 2019 deployments I am telling customers to stay on Teams 1.x and instead put their time into updating an image to 2022.
Can you please add the command line used to publish the new Teams 2.1 as seamless published application.
Unfortunately published app Teams 2.1 is not supported. You will have to publish the Web Based version via Edge if you want it Seamless.
Update on this. 2402 LTSR support publishing Teams 2.1 as an app. So once you upgrade to that you can publish it.
Could you help me with an FSLogix installation and/or where is the best place to find an FSLogix consultant? Thanks.
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.
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!
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?
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.
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.
It sounds like it may have done an update. Can you check the version under Program Files? And make sure that Teams updating is disabled.
Yes, teams update are disabled
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Teams]
“disableAutoUpdate”=dword:00000001
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
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.
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.
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.
Have you thought about putting the reg change for turning off and on the auto update into your script?
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.
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?
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?
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
SerializationVersion: 1.1.0.1
**********************
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.
Just an FYI ..
I am running the script in Admin mode.
I disabled the Reg Key to disable Teams.
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.
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
Hey Jeff!
how do u publish the new Teams (MSXI) with on prem CVAD Studio as Seamless App?
I installed the CVAD 2402 who supports it, but I can’t find a way.
Cheers!
You have to enable the App-V integration in your VDA install, then use the Web Studio to publish the MSIX. I am working on a mock up and demo of this in my lab with an article hopefully mid sept.
Jeff, thanks. this doesn’t work if the uuser has never launched teams before/upgrading from classic , from a non-persistent vdi.
also, everytime teams is upgraded there would be a new version path.
anyway around having to mod this everytime?
for example , “C:\Program Files\WindowsApps\MSTeams_23335.232.2637.4844_x64__8wekyb3d8bbwe\ms-teams.exe”
“Instead make a shortcut to %userprofile%\AppData\Local\Microsoft\WindowsApps\ms-teams.exe in their %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup”
Yeah, I found this as well. I am working on a new script that will launch from the user profile’s proper location, and if the installer account hasn’t launched it manually then it will prompt you.
Great howto! Thank you so much! But still New Teams does not autolaunch in our environment:
CVAD 2402 / Server 2019 / FSLogix HF4 / published Desktop
CVAD 2402 / Server 2022 / FSLogix HF4 / published Desktop
Regkeys are set as mentioned above (State = 2 and UserEnabledStartupOnce = 1)
Is there any solution to get it fixed ?
Hello Inga, still working on this. I usually will disable the autolaunch for all users. But then once the user launches it themselves it will be included in their auto-start profile.
Hi Jeff.
Enjoy your contributions to EUC.
I noticed on this script, you have two If(!(test-path -PathType container $Teams2InstallPath)) statements. Is this a typo? Also how would the script detect Server 202x, as it appears to default to the 2019 install process.
You are correct, it looks like my script cut out a section when I uploaded. I will fix this and update the script shortly.
Ok, corrected script has been re-uploaded. Thanks again Corey Tracey for checking my work.
We’re trying to deploy New Teams on Server 2022 – FSLogix HF4 – SentinelOne AV
New user profile, first login Teams opens and configures. Second login, autostart error, and error if you try to launch it manually. However there are two scenarios that we have validated that works:
1- Remove SentinelOne, current FSLogix configuration, all works fine
2- Disable FSLogix configuration policies (i.e. local profile), with SentinelOne installed, all works fine.
Any thoughts on this?
Do you have the necessary GPO entries in place for registering AppX packages? Also is there any security in the Sentinel One config for preventing App registration for users?
for anyone having issues starting teams with random users, just try to create the folder:
AppData\Local\Packages\MSTeams_8wekyb3d8bbwe
as a test
this is just a step/workaround during troubleshooting, not a complete solution.
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Kan ikke registrere pakken.
An internal error occurred with error 0x800700B7. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing
app deployment issues.
NOTE: For additional information, look for [ActivityId] cb2ac997-f8e1-0005-573a-42cbe1f8da01 in the Event Log or use th
e command line Get-AppPackageLog -ActivityID cb2ac997-f8e1-0005-573a-42cbe1f8da01
At line:1 char:1
+ Add-AppxPackage -MainPackage “MSTeams_8wekyb3d8bbwe” -RegisterByFamil …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (MSTeams_8wekyb3d8bbwe:String) [Add-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
i have not yet figured out why this is occurring for some users, other than it’s related to the user profile.
the teams add-in stopped working on RDS hosts for us recently. anyone else?
Hi John,
we are currently encountering problems with a RDS environment on Windows Server 2022 aswell.
Any fixes we have tried so far had no positive outcome.
It seems that there mustve been a problem with a recent teams or teams add-in version, that causes this issue on RDS, since there arent any known cases from before october/september.
Hi Jeff,
Is there a clear method to enable the autostart for MS teams 2.
Regkeys set State = 2 and UserEnabledStartupOnce = 1 aren’t working?
Kind Regards
I have been using WEM or a batch file to drop a shortcut in to the user’s personal startup folder.