Notes on Teams installing, paths, Citrix etc.

Stuff that’s already available on the Internet but just putting it here so I have one place to refer to whenever someone asks me on this Will keep updating this post as I go along…

(Note: I have a follow-up post here).

Installing

 

  • MSI installer options:
    • ALLUSERS=1 – the installer appears in add/ remove programs for all users and those with admin rights can uninstall.
      • msiexec /i <path_to_msi> /l*v <install_logfile_name> ALLUSERS=1
    • ALLUSER=1 – install per-machine rather than per-user (which is the default as mentioned above). Do this for Citrix and other VDI (see a few bullet points below).
      • With per-machine automatic updates is disabled.
      • msiexec /i <path_to_msi> /l*v <install_logfile_name> ALLUSER=1 ALLUSERS=1
      • You can’t be sneaky and do an ALLUSER=1 install on non-VDA machines as Teams.exe detects and blocks this (learnt via this blog post). Workaround is to create a HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\PortICA prior to the install to trick Teams.exe. This is if you want to install on a non-VDA machine of course, not something Microsoft recommends.
    • Note that ALLUSER=1 and ALLUSERS=1 are independent. The former controls per machine or per user; the latter controls whether the installer appears in add/ remove programs or not. Should have gone with better option names really.
  • You can also install Teams as part of Microsoft 365. This too runs the install for each user for they login as above – there’s nothing different about that.
    • This blog post too has info on Teams and OneDrive installation as part of Microsoft 365.

Uninstalling

  • If a user uninstalls Teams then it won’t reinstall for them. This is due to the presence of a regkeyHKEY_CURRENT_USER\Software\Microsoft\Office\Teams\PreventInstallationFromMsi.
  • Completely uninstalling and redeploying is via removing Teams from each user profile (via add/ remove programs?) and also deleting the stuff in %LocalAppData%\Microsoft\Teams for each user. Then delete a reg key HKEY_CURRENT_USER\Software\Microsoft\Office\Teams\PreventInstallationFromMsi and finally redeploy the MSI. (Wtf!)
    • There’s a PowerShell script to remove it from each profile.
    • msiexec /passive /x <path_to_msi> /l*v <uninstall_logfile_name>
    • Came across this blog post later. Loads of useful info, including an uninstall of per-user so we can switch to per-machine.
  • A better approach (I think) is to uninstall Teams per machine, nuke the %LocalAppData%\Microsoft\Teams folder per user, delete the per user uninstall reg keys HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Teams, delete the HKEY_CURRENT_USER\Software\Microsoft\Office\Teams\PreventInstallationFromMsi registry key, and reinstall?

 Updating

  • To update Teams for per machine installs we uninstall and install?
    • For per user installs it automatically updates.
  • Irritatingly, I can’t find a way to get version history of Teams so there’s no way to know if the latest MSI available is for a version you already have (except compare with your previously downloaded MSI I guess). No place to signup for Teams update notifications either. If you have Orca installed you can right click the MSI and see the version there (below screenshot is from the MSI I downloaded today; but Teams on my machine which is a per-user install and thus auto-updates is on a newer version 1.3.00.30866 – go figure!)

Teams Cache & Add-In

  • Teams has its cache at %AppData%\Microsoft\Teams. But it looks like there may be more locations than just that.
  • The Outlook add-in is at %LocalAppData%\Microsoft\TeamsMeetingAddin. There’s no way to download this apparently; you install Teams and it does the downloading behind the scene. (seriously, wtf!)
  • You can turn off calling and meeting features for users via policies. Sucks that I can’t just turn it off per machine – like those on a Citrix session. Ideally I’d like to stop calls and meetings on Citrix but allow the same users to do these via their phones or local machines.

Citrix & Teams

  • Citrix & Teams have optimizations wherein the call audio/video and screen sharing traffic flow happens from the client rather than VDA.
    • The VDA needs to be 1906.2 or higher. The client needs to be Workspace app 1907 or higher.
    • Currently only Windows clients are supported.
      • macOS support is in preview (2009 and above).
      • Linux too seems to be supported (2006 and above)(also x64 distros only).
    • This also needs a Citrix policy setting (which is on by default). This needs to be allowed, and the Workspace version supported, before optimizations are turned on. In this case a registry key is set to indicate Teams is running optimized. HKEY_CURRENT_USER\Software\Citrix\HDXMediaStream\MSTeamsRedirSupport value 1.
    • You can see if Teams is running optimized or not via About > Version. Screenshots here.
    • This is a live article from Citrix with latest updates (CTX253754).
  • Citrix persistent vs non-persistent:
    • Non-persistent means you have a master image and the actual VDA server is reset upon a reboot and so all user profiles etc. are deleted.
    • Persistent means you don’t have a master image and user profiles are kept on the server.
    • What hapens if you don’t have a master image but user profiles are deleted upon logout? That comes under non-persistent. So persistent & non-persistent is about the user profile really than the image.
    • For non-persistent sync these folders using UPM or similar:
      • %localAppdata%\Microsoft\IdentityCache
      • %appdata%\Microsoft\Teams
      • List of file & folder exclusions can be found here. Use that along with the updates at this blog post (which is a great read for general Teams info too).
    • For persistent you can do both per-machine or per-user install.
    • For non-persistent you must do per-machine install.
  • Citrix screensharing:
    • I didn’t understand this bit:

Microsoft Teams relies on video-based screen sharing (VBSS), effectively encoding the desktop being shared with video codecs like H264 and creating a high-definition stream. With HDX optimization, incoming screen sharing is treated as a video stream. Therefore, if you are in the middle of a video call and the other peer starts to share the desktop, that original camera video feed is paused. Instead, the screen sharing video feed displays. The peer must then manually resume the camera sharing.

    • Good stuff:

If you are publishing Teams as a stand-alone seamless application, screen sharing captures the local desktop of your physical endpoint in Citrix Workspace app minimum version 1909.

If Microsoft Teams fails to load in optimized VDI mode (“Citrix HDX Not Connected” in Teams > About > Version), the VDA falls back to legacy HDX technologies like Webcam redirection and client audio and microphone redirection. In fallback mode, the peripherals are mapped to the VDA. The peripherals appear to the Microsoft Teams app as if they were locally attached to the virtual desktop.

You can now granularly control the fallback mechanism by setting one of the following registry DWORD values in the VDA:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Teams\DisableFallback

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Teams\DisableFallback

To disable fallback mode, set the value to 1. To enable audio only, set the value to 2. If the value isn’t present or is set to 0, fallback mode is enabled. This feature requires Teams version 1.3.0.13565 or later.

    • So in fallback mode you will have poor performance and increased CPU usage of the Citrix servers. Hence it is better to disable it by setting the value to 0, or at least 1 if you want to allow just audio.

When legacy HDX technologies are used, Microsoft Teams doesn’t offload audio, video, and screen sharing processing to the endpoint’s Citrix Workspace app WebRTC media engine. Instead, HDX technologies use server-side rendering. Expect high CPU consumption on the VDA when you turn on video. Real time audio performance might not be optimal.

Known Issues

Elsewhere

I linked these above but will put them here so its easy to access: