During the last couple of weeks I have been helping customers implement Microsoft Teams in their Citrix VAD setups. A common denominator for most of the Teams implementations was Teams consuming a lot of resources, different Teams versions were present in the environment and Teams generating a huge amount of temporary or cached data in the user’s profile.
In this article I’ll share my experiences with Teams in Citrix VAD. This is by no means a best-practices install or configuration guide it’s more of a guide on how to avoid a couple of different pitfalls and hopefully also provide a great user experience with Teams in a Citrix VAD setup.
System drive install prevents auto-updating which allows proper QA of new Teams releases if Microsoft does not enforce that release. At one time system drive was the only way to get Citrix optimizations for teams, however this is no longer the case. This is a Live article - updated frequently with the latest info an known issues. Minimum Teams version: 1.2.00.31357 Recommended Teams version: 1.3.00.21759 (or higher) The following article provides guidelines for troubleshooting the HDX optimization for Microsoft Teams in Citrix Virtual Apps and Desktops 1906.2 or higher. Citrix strongly recommends the latest current release Workspace.
If you are not familiar with Microsoft Teams, you might want to gather some information before installing or configuring anything with Teams in a Citrix VAD setup. Visit this site, if you want to know more about Microsoft Teams.
First of all I want us to be on common ground before going any further with this article, so we’ll have to cover the different ways of installing Microsoft Teams, as this is an area causing a bit of confusion. In this article I am using the 64-bit version of Teams and the 64-bit version of Office installed in Windows Server 2019 with using FSLogix Profile Container.
Installing Microsoft Teams Per-User:
Today there are 2 different ways of installing Microsoft Teams. You can install it either as a per-user install or a per-machine (machine-wide) install. Microsoft recommends to install Teams as a per-machine install in non-persistent setups.
The per-user install can be installed in a few different ways. Either via the Office 365 click-to-run installer, via an EXE file or via an MSI file, Microsoft isn’t making this easy! Both the EXE installer and MSI installer can be downloaded in either 32-bit or 64-bit, make sure to get to one matching the Windows architecture.
You can get the EXE file here:
https://products.office.com/en-us/microsoft-teams/download-app
You can get the MSI files here:
32-bit – https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&managedInstaller=true&download=true
64-bit – https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true
Microsoft Teams On Citrix Xenapp
So, as you can there are 3 different ways of deploying Microsoft Teams as a per-user install, a bit of a mess if you ask me and I am not surprised if some finds it a bit confusing.
We’ll need to dive a bit deeper in how the per-user install actually works, even though it’s not the recommended way of deploying Microsoft Teams, there is some useful information for when we cover the migration from the per-user install to a per-machine later in this article.
Both the EXE file, MSI file and the Office 365 click-to-run “installs” a Teams.exe file and a setup.json file in C:Program Files (x86)Teams Installer:
In this case I have installed version 1.3.0.4461 of Teams:
The Teams.exe file is the actual installer, which installs Microsoft Teams in AppDataLocalMicrosoft the user’s profile. The installation is triggered by Teams.exe process via registry, which can be found here:
For copy/pasting:
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionRun
So a plain old registry value in Run is used to kick off Teams, not necessarily the best way to start an app in a non-persistent shared environment, but then again this is the per-user install of Teams, which is meant to be installed on a physical Windows 10 machine, not a shared environment.
As mentioned, during logon Teams is installed in the user’s profile and when Teams is started up and the user has logged on, this is how the Teams install folder looks like:
Once this is completed, the Update.exe process, now in the user’s profile, is used to start Teams. This is, again, done via registry:
For copy/pasting:
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun
As you can see the Update.exe is executed with a few parameters. I have not been able to find any information as to why this procedure is used to start Teams in a per-user install. My guess is that this Update.exe process checks for any new releases of Teams during startup of Teams, and then downloads the latest version at some point.
Microsoft has a very short article about the update process here:
https://docs.microsoft.com/en-us/microsoftteams/teams-client-update
According to the article Teams is updated every two weeks, no specific time of day is mentioned, so we’ll have to assume that the update process just kicks in at random. I have had a Teams running in a session for a couple of hours, no update kicked in. I have tried to log on and log off several times with Teams auto launching, nothing. At a customer I have seen 3 different versions of Teams being used at the same time, by different users. This might complicate things a bit in terms of troubleshooting because of the different versions. Some users might have issues that other users don’t have because they user another version of Teams.
For the sake of this article, I have done a manuel update via the “Check for Updates” feature:
This kicks off the update process, where the Teams.exe process and the Updates.exe process both consume a considerable amount of CPU resources, both processes have the priority of “normal” in Windows, which means that it might slow any other applications down for a couple of minutes, especially if you have multiple users where this update kicks in at the same time.
The update process goes out to Microsoft and downloads the latest version of Teams to the AppDataLocalMicrosoftTeamsstage folder in the user’s profile:
Once the source files for the new version of Teams are downloaded, the user will get a notification about a new version being available:
If the user clicks the “Please refresh now” text box, the updater kicks in and is again consuming a considerable amount of CPU resources, still at “normal” process priority, which may once again potentially slow other apps down for a period of time.
Interesting stuff is also going on in the user’s profile. The “stage” folder is now removed, and replaced with a “previous” folder:
So the user now has two versions of Teams in the profile, the current updated version, which is installed in the “current” folder and is the one being actively used in the current folder, and then the previous version of Teams, which is no longer used, essentially now doubling the amount of space used for the Teams install. Considering that I have found no information of how a user might be able to revert to a previous version of Teams, there is nothing in the Teams app that enables the user to roll back to a previously used Teams version, I am having a difficult time understanding why it’s necessary to store the previous version in the user’s profile, why isn’t just deleted?
To wrap this section up, there really isn’t any reason to use a Teams per-user install in a shared environment. In a shared environment we should have a degree of control of the apps installed and update process of the apps, to ensure stability and functionality. With a Teams per-user install, we don’t have any control, from the moment it’s installed it’s out of our control, because we don’t control the update process.
Migrate Teams per-user to Teams per-machine
Now you have come this far and you might have realized that Teams isn’t installed in the correct and recommended way, you can go a few different ways. Leave it be, and hope that Microsoft doesn’t change anything major or add additional features, which might demand even more resources or maybe break existing functionality. Or remove the current Teams per-user install and deploy the Teams per-machine install instead, which is also the recommendation from Microsoft.
If you decide to leave Teams alone in it’s current state, then there is no reason for you to read any further. However if you want to deploy the Teams per-machine instead, then stay with me.
To be honest this isn’t really a migration, it’s really “just” an uninstall of Teams, and an install of Teams suited for non-persistent shared environments.
Switching to a Teams per-machine install is fairly easy, you are probably not expecting that, considering we have to go out to every single user profile and remove a Teams per-user install, but Microsoft has actually done some clever thinking, when it comes to removing Teams per-user.
Uninstall Teams per-user
The first thing we’ll need to do is to remove the Teams per-user install. In Windows Server 2019 we’ll go to Apps and Features select the “Teams Machine-wide installer” and click uninstall. In this case the name is not entirely accurate, or it is, but the “Teams Machine-wide installer” is the machine-wide, or the per-machine installer, but it can also do a Teams per-user install. You might see “Teams” or “Teams Installer” instead, this is because you have used the EXE installer, mentioned earlier.
Back on track. The uninstall should be pretty uneventful, it’s an uninstall like any other uninstall, other than this uninstall only removes the C:Program Files (x86)Teams Installer folder, and not the Teams installed in the user’s profile. So, how to remove Teams from the users profiles? This is where Microsoft has done some clever thinking. During the uninstall of Teams per-user, two registry values are created here:
For copy/pasting:
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionRun
We need the data in the value “TeamsMachineUninstallerLocalAppData”, this string will uninstall Teams per-user, in the user’s profile.
For copy/pasting:
%LOCALAPPDATA%MicrosoftTeamsUpdate.exe –uninstall –msiUninstall –source=default
You HAVE to use this uninstall string, it is not enough to just delete the Teams folder from the user’s profile, Teams will come back if you do and you could end up with a mix of Teams per-user and Teams per-machine, they are able to exist perfectly fine side by side, you don’t want that!.
If you leave both values where they are, Teams will be uninstall during the next logon. In some cases that might be OK, however if you want a more controlled process, let’s say you want to do the uninstall for a specific group of users or when user’s access a test-server, you can bring in something like Citrix Workspace Environment Management, to execute the uninstall string based on AD group membership or anything that would identify the server as a test-server or whether the Teams install is a per-user or per-machine.
If you are going with the WEM approach make sure that both the “TeamsMachineUninstallerLocalAppData” and “TeamsMachineUninstallerProgramData” values are deleted, before going any further.
In WEM we can use an external task to execute the uninstall string:
Microsoft Teams Citrix Support
Instead of using an AD group membership as a filter for the Teams per-user uninstall, we can use a combination of two filter conditions doing File/Folder matches, making sure that Teams per-user is not uninstalled, unless there is a Teams per-machine installed on the Session Host/VDI. We will have to create a filter condition which is checking to see if “%LOCALAPPDATA%MicrosoftTeamscurrentTeams.exe” exists and another filter condition which is checking to see if “C:Program Files (x86)MicrosoftTeamscurrentTeams.exe” exists. The “C:Program Files (x86)MicrosoftTeams” folder is where the Teams per-machine is installed, we’ll cover that in a moment.
Microsoft Teams On Citrix Vdi
The filter conditions look like this:
With these conditions I can create a filter rule which can be assigned to the “Teams per-user uninstall” external task.
The filter rule looks like this:
For this filter rule to apply, both filter conditions have to me met.
The last thing we need is to assign the “Teams per-user uninstall” external task:
Go to Assignments and click the little arrow button
In the drop down box select the filter rule we just created
You should end up with an assignment looking like this.
To summarize – Via WEM we are now uninstalling Teams per-user if the user is logging on to a Session Host/VDI that has Teams per-machine installed and Teams per-user exists in the user’s profile. We now have a controlled way of getting rid of Teams per-user.
Install Teams per-machine (Machine-wide)
There are a lot of different articles and guides on how to install Teams in a non-persistent and/or shared environment, I recommend this article by fellow CTA Manuel Winkel:
https://www.deyda.net/index.php/en/2020/02/25/install-teams-onedrive-in-citrix-machine-based/
Going further, I am assuming that you are going with the WEM approach, if you are not there might be some slight differences in how Teams behaves.
Also be aware that Microsoft is not making things easy for us at the moment. Currently there are two different download links for the Teams per-machine MSI installer, make sure to get the version from the link i Manuels article, as this is the version currently supported by Citrix (CTX253754). Make sure to keep an eye on that CTX253754 article.
The most important thing to remember is to user the correct install parameters during setup, to make sure that Teams is deployed as a per-machine install. Either go to the article by Manuel, refer to the official “Teams for Virtualized Desktop Infrastructure” documentation or use this command:
msiexec /i Teams_windows_x64.msi ALLUSER=1 ALLUSERS=1
To verify that it is a Teams per-machine install, make sure that you have a “C:Program Files (x86)MicrosoftTeams” folder. The folder structure in here should look familiar to you:
Teams is launched from the “current” folder via the Teams.exe process and once again a registry value is used to do the launch.
The registry value can be found here:
For copy/pasting:
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionRun
Personally I delete this registry value, because I don’t want Teams auto starting via registry. There might be situations where you want to have a bit more control over who is running Teams, maybe because of license enforce ment or maybe you are testing Teams, and only want a certain group of users to be able to access Teams. Or perhaps you just don’t want applications auto launching during logon.
How To Install Teams On Citrix
To control the Teams startup, we’ll again turn to Citrix WEM. Create an action, in this case it’s just called “Teams”:
Assign the newly created Teams action:
In this case I have created filter rule with a filter condition with an AD group membership check, so my user will have to be a member of a specific AD group for the action to apply.
Configure Teams for automatic start up:
Make sure Auto Start has a green check mark.
This is it! Teams per-machine is now alive and kicking.
Profile Exclusions
Both Teams per-user and Teams per-machine downloads a huge amount of temporary/cache data during first launch just to immediately flush it again, and to be honest I am not entirely sure why or what kind of data is downloaded, especially not with the per-machine install. However if you are not configuring the correct exclusions, you might see your FSLogix Profile Container increase in size, as the temporary/cached Teams is written and flushed.
With a fresh FSLogix profile, I have seen the container expand to around 4-5GB in size when launching Teams, with writes going the the AppDataRoamingMicrosoftTeamsService WorkerCacheStorage folder. If you mount the profile container, when it’s not in use, you’ll find that there’s only around 400-800MB of data in the container, and nothing or very few small files in the AppDataRoamingMicrosoftTeamsService WorkerCacheStorage folder.
As with any other profile exclusions, you should of course do some testing, before implementing in a production environment
UPDATE – 14-07-2020 (july 14, 2020):
If you are using FSLogix Office Container, do not include Teams data in the Office Container, as the exclusions mentioned will no apply to the Office Container, they only apply to the Profile Container.
This means that you should either leave this policy at not configured or configured it as disabled:
UPDATE – 19-05-2020 (may 19, 2020):
The list of exclusions, below, has once again been updated. Via a Citrix discussions forum post, I have been made aware that certain exclusions are breaking things.
Excluding “AppDataLocalMicrosoftTeamscurrentresourceslocales” apparently breaks the system tray menu.
Excluding “AppDataLocalMicrosoftTeamsCurrentLocales” apparently breaks SSO to Teams.
Do not add the folders with a strikethrough. If you do, test, test, test!
Exclusions:
AppDataLocalMicrosoftTeamsPackagesSquirrelTemp
AppDataLocalMicrosoftTeamscurrentresourceslocalesAppDataLocalMicrosoftTeamsCurrentLocales
AppDataRoamingMicrosoftTeamsService WorkerCacheStorage
AppDataRoamingMicrosoftTeamsApplication Cache
AppDataRoamingMicrosoftTeamsCache
AppDataRoamingMicrosoft TeamsLogs
AppDataRoamingMicrosoftTeamsMedia-Stack
AppDataRoamingMicrosoftTeams*.txt (Cannot be implemented with FSLogix Profile Container, as it does not support file exclusion or exclusions based on wildcards)
UPDATE – 03-05-2020 (march 3, 2020):
The list of exclusions, below, has been updated. According to the Microsoft Teams documentation the AppDataRoamingMicrosoftTeamsMedia-Stack should be excluded and the same goes with AppDataRoamingMicrosoftTeams*.txt files
Teams Outlook Add-in
For some reason the Teams per-machine Outlook add-in is not loaded, so when a user launches Outlook and wants to arrange a new Teams meeting, the Teams add-in is simply not there, and it’s nowhere to be found in the list of available add-ins:
I would expect the add-in to be between the Skype add-in and the OneNote add-in, but it’s not. I am not entirely sure what is going on here, but I have found a workaround which should bring the Teams add-in back.
UPDATE – 03-05-2020 (march 3, 2020):
Teams has to be launched at least once to be able to access the Teams plugin. This means that even if you activate the plugin in Outlook,during first logon, it does not work until Teams is launched. For now I haven’t found any solution to that issue.
Microsoft Teams And Citrix
The workaround is a minor registry change in HKCU, configuring the LoadBehavior value for Microsoft Outlook add-ins:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftOfficeOutlookAddInsTeamsAddin.FastConnect]
“Description”=”Microsoft Teams Meeting Add-in for Microsoft Office”
“LoadBehavior”=dword:00000003
“FriendlyName”=”Microsoft Teams Meeting Add-in for Microsoft Office”
This should bring back the Teams outlook add-in. We can, once again, use our trusted Citrix WEM to do the import where we’ll create a nice little action group, with the Teams shortcut and the registry values like this:
Apply the Teams Auto Start filter rule we created earlier, in this way we have everything around Teams in one single group.
And here is the highly demanded Teams outlook add-in:
Citrix HDX Optimization
The last thing we need to do is to make sure that Citrix HDX Optimization has kicked in.
The Teams HDX Optimization is supported in Citrix Virtual Apps and Desktops 1906.2 and later and you’ll also have to use Citrix Workspace App 1907, however Citrix strongly recommends using Citrix Workspace App 1912 or 2002. You will also need Teams version 1.2.00.31357, however Citrix recommends version 1.3.00 .4461 or later.
Refer to this article for additional information:
https://support.citrix.com/article/CTX253754
If all of the above mentioned criteria have been met, you should see a “Citrix HDX Optimized” notification in Teams (in about -> version):
The Teams HDX Optimization enables Teams video and audio calls to be offloaded to the local endpoint device, this feature offloads a considerable amount of CPU usage on the Session Host/VDI to the endpoint. Be aware that the Teams HDX Optimization feature is not available on Linux based devices, at the moment it’s only supported on Windows devices.
Thank you for reading. If you have any questions feel free to contact me via Twitter, LinkedIN or in the World of EUC Slack channel.
Get a fully native, fully featured Microsoft Teams experience within Citrix Virtual Apps and Desktop
What is it?
HDX optimization for Microsoft Teams gives customers a fully native, fully featured Microsoft Teams experience within Citrix Virtual Apps and Desktops. With a single point of authentication, this essentially also improves reliability and ease of use.
The Citrix Workspace app has a built-in multi-platform HDX Media Engine that ensures optimized device and media handling, with audio, video, and screen sharing offloaded to the user’s device.
What this means for you
With many organisations on Office 365 or migrating to Office 365, one of the benefits of the HDX optimisation is the ability to take advantage of an intelligent communication solution, as Microsoft Teams is bundled into Office 365.
With built-in tools within Microsoft Teams, people can work more efficiently and stay connected wherever they are, on any device, through centralized delivery optimized by Citrix. Not only are you giving your employees a solution that helps them be more productive, IT teams also get the added benefits of centralized management. Because information such as data and chat logs stay in a cloud environment and are not stored on native devices, you’re ensuring better control over sensitive information.
Book Consultation
Book a free consultation with one of our Citrix experts today to discuss your upgrade.
Since its launch, Microsoft Teams has become the fastest growing app in Microsoft’s history with more than 330,000 companies worldwide using it.
If you’re working in one of those companies, then you’re probably finding new ways to use the app on a daily basis. But if you’re not, here are 5 reasons why you should consider using Teams today.
1. It’s more than just chat
You can use the chat window in Teams to have quick conversations with your colleagues. But there’s so much more to it.
Need to share a file? Just attach it in the chat. Then simply call or video call your colleague to discuss the file straight from the window. Or schedule a meeting without leaving the chat. Teams integration with other Microsoft products like OneNote and Office means no more switching between apps throughout your conversation. It’s all right there in chat.
2. Before, during and after in Meetings
Getting everything ready for meetings can be a challenge. The agenda is in one email, agreed actions in another. And where’s the thing you were supposed to review before the call?
Install Microsoft Teams Citrix Xenapp
Meetings in Teams makes that experience so much easier. As soon as you create the meeting, you can start chatting with the participants about the agenda, share the files that you need them to review, and keep track of the meeting notes and to dos. You can even check who those unknown people are that have been invited.
Then after, the recording of the call is immediately available in the same tab, so if you missed the meeting, you don’t need to hunt for the recording. It’s right there, with the meeting notes and agreed actions.
3. Fewer emails
Drowning in your emails becomes a thing of the past. As conversations are now held in a structural way in your Teams, you no longer have all the email-upon-email response, often sent as a Reply All.
And if somebody needs to send you a file, or ask you a one-liner question? That’s what chat is for!
4. Improved collaboration and communication
Thanks to the tight integration with Office 365, you don’t need to switch apps when you need to collaborate on a document. You can create the Word, Excel or PowerPoint document in Teams, immediately share it with your co-workers and then co-author within a blink of an eye.
No more sending out different versions through email and the resulting version confusion. You can add comments and to-dos, and chat with your co-workers to discuss the document right there.
5. Stay connected, anytime, anywhere
While on the move, we need to stay connected, be reachable and have access to all your resources. With the Teams mobile app, you have immediate access to all your apps and documents. You can easily respond to chat and conversations, join meetings with one click and continue to collaborate. So even on the move, you are kept completely in the loop.
When possible, the HDX media engine in the Citrix Workspace app (HdxTeams.exe) tries to establish a direct network Secure Real-time Transport Protocol (SRTP) connection over User Datagram Protocol (UDP) in a peer-to-peer call. If the UDP ports are blocked, the media engine falls back to TCP 443. The HDX media engine supports Interactive Connectivity Establishment (ICE), Session Traversal Utilities for NAT (STUN), and Traversal Using Relays around NAT (TURN) for candidate discovery and connection establishment.
If there is no direct path between the two peers or between a peer and a conference server (if the user is joining a multi-party call or meeting), HdxTeams.exe uses a Microsoft Teams transport relay server in Office 365 to reach the other peer or the media processor (where meetings are hosted). The user’s client machine must have access to two Office 365 subnet IP address ranges and 4 UDP ports.
Skype Real Time Optimization Compared to Microsoft Teams Optimization
Citrix have bundled all the HDX optimization code into Workspace app for Windows (versions 1907 or higher) and VDA (versions 1906.2 or higher). There will be no more plug-ins like with the Real Time Optimization Pack (RTME and RTC).
Citrix have taken this opportunity to expand the feature set from RTOP. Long awaited features like recording support (thanks to Microsoft Stream) or screensharing optimization are now part of HDX, and more will be added with every quarterly release.
That means customers on Citrix Current Releases will get new features for Teams. So, as a best practice, you’ll need to interact with your Unified Communications group in a different way than before because there is no more decoupling like in the RTOP days, when you could keep your Workspace app and VDA at one version and RTOP at another. Now you’ll have to work in unison if there is an upgrade required.
Time is Ticking
Skype for Business Online will be retired on 31st July 2021, therefore everyone using Skype for Business Online need to transition to Microsoft Teams before this date. This further fuels the need to prepare your Citrix deployments to support Microsoft Teams with enough time to do the transition.
How to get it
To enable Teams HDX support in your environment, the Delivery Controller, Virtual Delivery Agents, and the Workspaces Client need to be running a compatible version, and have compatible operating systems.
CR Customers
The Delivery Controllers and Virtual Delivery Agents both need to be running 1906.2. The following operating systems are supported:
Microsoft Teams Machine Installer Citrix
- Delivery Controllers
- Windows Server 2019, 2016, 2012R2 Standard and Datacenter Editions, and with the Server Core option
- Virtual Delivery Agents
- Windows 10 64-bit, minimum versions 1607 up to 1903.
- Windows Server 2019, 2016, and 2012 R2 (Standard and Datacenter Editions).
The client needs to be running the Workspace app for Windows version 1907 or higher.
LTSR Customers
You can, of course, park your Citrix environment in the upcoming LTSR 1912 release and enjoy the HDX optimization for Microsoft Teams. Virtual Apps and Desktops 7 1912 and Citrix Workspace app 1912 will include optimization for Microsoft Teams and will be packed with a wide set of features.
Because LTSR by nature is an immutable release, it won’t receive new features like Current Releases do. However, because of how Citrix have architected optimization for Teams (with the VDA being a transparent pipe between Teams and Workspace app), customers on CVAD LTSR 1912 could still receive most of the feature updates if they’re on the Current Releases of Citrix Workspace app.
Stress Free Citrix Upgrades
We have been a Citrix partner since 2001, with some of our consultants working with the technology since WinFrame in 1995!.
We’ve completed countless Citrix upgrades and migrations for clients, so if you need help upgrading Citrix to benefit from the HDX Optimisation or getting them most from Teams book a free consultation today.