Oct 272020
 

This document was built on Slack, Citrix URLs, and Citrix Consultants from the field that shared how they successfully were able to get teams working 100% within Citrix. If you disagree and find something different then let’s update it. But the information Is shared among many people and it is showing good results. I’ll try to keep it updated around new blogs and actual experience in the area of installing teams in a CVAD environment.

  1. Different installer for Teams
  • If you install Team.exe, this is the user installer. It will either install in the user profile or program data. 
  • If you install the MSI version of Team, this is the Machine Wide installer. Citrix states they need the machine-wide installer.
  1. Uninstall Teams per user -clean up and redeployment procedure
  • Uninstall user per team’s installer before proceeding on Team machine installer
  • You can have Citrix WEM run this for the user, inside their profile.
  • Location: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run
  • Option 1: 
  • %LOCALAPPDATA%\Microsoft\Teams\Update.exe –uninstall –msiUninstall –source=default
  • %Programdata%\Microsoft\Teams\Update.exe –uninstall –msiUninstall –source=default
  • C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -command set-executionpolicy bypass -Scope CurrentUser
  • C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -File “\\domain\NETLOGON\CitrixScripts\WemExternalTask\TeamsUninstall-Users\TeamsUser-Uninstall.ps1” -NoProfile -Noninteractive
  • But I changed the part in the Script to do it while the user is logged in.

$TeamsStartMenuShortcut = “c:\users\$env:USERNAME.$env:USERDOMAIN\Start Menu\Programs\Microsoft Corporation”

$TeamsDesktopShortcut = “c:\users\$env:USERNAME.$env:USERDOMAIN\Desktop\Microsoft

Teams.lnk”

  • originally it was

$TeamsStartMenuShortcut = “\\domain\share\$env:USERNAME.$env:USERDOMAIN\Start Menu\Programs\Microsoft Corporation”

$TeamsDesktopShortcut = “\\domain\share\$env:USERNAME.$env:USERDOMAIN\Desktop\Microsoft Teams.lnk”

  • Then I used a WEM external Task to run it.
  1. Block user installs
  • Deny access to C:\Users\*\AppData\Local\Microsoft\Teams
  • Use Fslogix appmasking
  1. Citrix
  • Minimum Version1906.2:
  • Best results are 1912
  • Virions -Optimization for Microsoft Teams requires a minimum of Microsoft Teams version 1.2.00.31357.
  • We recommend you follow the Microsoft Teams machine-wide installation guidelines and avoid using the .exe installer that installs Teams in Appdata. Instead, install in C:\Program Files (x86)\Microsoft\Teams by using the ALLUSER=1 flag from the command line. In this mode, the 
  •  Teams application doesn’t auto-update whenever there is a new version. We recommend this mode for non-persistent environments. For more information, see Install Microsoft Teams using MSI (VDI Installation section).
  1. Microsoft VDI

https://docs.microsoft.com/en-us/microsoftteams/teams-for-vdi#install-the-teams-desktop-app-on-vdi

These examples also use the ALLUSERS=1 parameter. When you set this parameter, Teams Machine-Wide Installer appears in Programs and Features in Control Panel and in Apps & features in Windows Settings for all users of the computer. All users can then uninstall Teams if they have admin credentials. It’s important to understand the difference between ALLUSERS=1 and ALLUSER=1. The ALLUSERS=1 parameter can be used in non-VDI and VDI environments and the ALLUSER=1 parameter is used only in VDI environments to specify a per-machine installation.

  1. Dedicated VDI (updated)

You have Windows 10 dedicated persistent VDI environments. You want the Teams application to auto-update and would prefer Teams to install per-user under Appdata/Local, use the .exe installer or the MSI without ALLUSER=1.  (I don’t know if they will be optimized for Citrix though?)

Updated 8/18/2020

I confirmed that it’s still optimized as well on the user install. I was wondering this and now I know.

Non-Presisten VDI or RDSH (XenApp)

ALLUSERS=1:  Teams Machine-Wide Installer appears in Programs and Features in Control Panel and in Apps

ALLUSER=1: used only in VDI environments to specify a per-machine installation

  1. Per-machine installation for VDI

/l*v  ALLUSER=1 ALLUSERS=1

“msiexec /i <path_to_msi> /l*v <install_logfile_name> ALLUSER=1 ALLUSERS=1

“msiexec /i Teams_windows_x64.msi ALLUSER=1 ALLUSERS=1”

  1. FSlogix Profile exclusions

<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\Logs</Exclude>

<Exclude Copy=”0″>AppData\Roaming\Microsoft\Teams\media-stack</Exclude>

AppData\Local\Microsoft\Teams as it will break some pieces in the Citrix discussion below.

https://discussions.citrix.com/topic/406559-fslogix-vhd-size-dramatically-different-from-actual-file-content-size-and-will-not-compress/page/6

Source: https://virtualwarlock.net/microsoft-teams-in-citrix/

Source2: https://james-rankin.com/articles/quickpost-how-to-stop-fslogix-profile-containers-bloating-when-running-microsoft-teams/

  1. Warning and issues (Darn Json Files are just a pain and don’t seem to get honored very well.)

Running the MSI in VDI mode by using the switch Alluser=1 makes teams completely ignores the JSON files.  It ignores the setup.json and it ignores the desktop-config.json file. It must be a bug. Redirecting it to any other JSON file anywhere else won’t help as it doesn’t respect JSON files. Still trying to work through this.

  1.   Disable Teams auto-launch

Disable Teams auto-launch after installation

Delete Teams regkeys following locations

HKEY_LOCAL_MACHINE \SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run 

HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\Windows\CurrentVersion\Run

HKEY_CURRENT_USER \SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Then apply GPO not to auto Launch Teams. 

  • Note that currently, it is not possible to disable Auto-start even if using the command line flag OPTIONS=”noAutoStart=true” with the machine-wide MSI and the ALLUSER=1 property. Deleting the reg key described in bullet#2 should fix this.

Source: 

https://support.citrix.com/article/CTX253754

https://docs.microsoft.com/en-us/microsoftteams/scripts/powershell-script-teams-reset-autostart

  • If you have profiles that have auto-launch already set, then you will have to run this script to clear out the settings. If you want to use the “Prevent Microsoft Teams from starting automatically after installation. Group Policy setting, make sure you first set the Group Policy setting to the value you want before you run this script. 

Teams-AutostartResetCU

  • Some are saying do the auto-launch with teams because it not as CPU intensive.

Source: https://virtualwarlock.net/microsoft-teams-in-citrix/

  1. James Ranklin method of disable auto-setup, enable auto-start once the setup is triggered manually by the user, and also make sure that the openAsHidden flag is actually respected.  Scroll down to “Solving It”
https://james-rankin.com/articles/microsoft-teams-on-citrix-virtual-apps-and-desktops-part-1-installing-the-damned-thing/
  1. Disable GPU offload, because teasm will have HIGH CPU usauge 

(Run this with WEM)

Source: https://www.itexperience.net/fix-performance-issues-teams-high-cpu-memory-usage/

Source: Slack

$ErrorActionPreference = ‘SilentlyContinue’

$JsonFile = [System.IO.Path]::Combine($Env:AppData, ‘Microsoft’, ‘Teams’, ‘desktop-config.json’)

$ConfigFile = Get-Content -Path $JsonFile -Raw | ConvertFrom-Json

Try {

    $ConfigFile.appPreferenceSettings.openAtLogin = $False

    $ConfigFile.appPreferenceSettings.disableGpu = $True

} Catch {

    Write-Host  “JSON element doesn’t exist”

}

$ConfigFile | ConvertTo-Json -Compress | Set-Content -Path $JsonFile -Force 

Update as of October 21st 2020.  This seems to work really well.

https://github.com/Mohrpheus78/Microsoft/blob/main/Teams%20User%20Settings.ps1?s=03

  • For this I did a WEM external Task that does the following

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -command set-executionpolicy bypass -Scope CurrentUser

C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -File “\\domain.org\NETLOGON\CitrixScripts\WemExternalTask\DisableGPUTeams_VDI\disableGPUTeams.ps1” -NoProfile -Noninteractive

  1. Monitoring Teams with HDX Monitor

    On 1912 VDAs (or higher), you can monitor an optimized active call using HDX Monitor (3.5.2 or higher).
    To turn this on, create the following WebrtcDirectorIntegration regkey on the VDA:

    HKLM\Software\Citrix\HDXMediaStream\
    Or
    HKLM\SOFTWARE\WOW6432Node\Citrix\HdxMediaStream
    – reg key value:
    name: WebrtcDirectorIntegration
    type: DWORD
    value: enable(1), disable(0)
  1. Enable Team in Citrix

Enable optimization of Microsoft Teams

To enable optimization for Microsoft Teams, use the Studio policy described in Microsoft Teams redirection policy (it is ON by default). In addition to this policy being enabled, HDX checks to verify that the version of the Citrix Workspace app is equal to or greater than the minimum required version. If you enabled the policy and the Citrix Workspace app version is supported, the HKEY_CURRENT_USER\Software\Citrix\HDXMediaStream\MSTeamsRedirSupport registry key is set to 1 automatically on the VDA. The Microsoft Teams application reads the key to load in VDI mode.

NOTE:

If you are using version 1906.2 VDAs or higher with older Controller versions (for example, version 7.15), which do not have the policy available in Studio, you can still be optimized because HDX optimization for Microsoft Teams is enabled by default in the VDA.

If you click About > Version, the Citrix HDX Optimized legend displays:

Optimized for Citrix legend

Recommended version – Citrix Workspace app 2006.1 for Windows and Minimum version – Citrix Workspace app 1907 for Windows:

Source: https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/multimedia/opt-ms-teams.html

  1. Troubleshooting MS teams in Citrix

https://support.citrix.com/article/CTX253754

  1. To prevent Teams from installing in Office updates.

If your organization isn’t ready to deploy Teams and you use Group Policy, you can enable the Don’t install Microsoft Teams with new installations or updates of Office policy setting. You can find this policy setting under Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Updates.

It will add this key.

All of this is references from Slack and conversations, virtual Warlock Site and Citrix Troubleshooting Docs

https://support.citrix.com/article/CTX253754

  1. Outlook Plugin appears to break at times or may never load.

For it not loading, Please follow Kasper’s guide here

Search for “Teams Outlook Add-in” on his page.

  1. Outlook Plugin appears to break at times and this is what I have found so fart that fixes it.

Copy the two folders from C:\Program Files (x86)\Microsoft “TeamMeetingAddin” and TeamsPresenceAdmin” to C:\Users\%username%\AppData\Local\Microsoft.
The run this
%SystemRoot%\System32\regsvr32.exe /s /n /i:user %LocalAppData%\Microsoft\TeamsMeetingAddin\1.0.19317.2\x64\Microsoft.Teams.AddinLoader.dll
%SystemRoot%\SysWOW64\regsvr32.exe /s /n /i:user %LocalAppData%\Microsoft\TeamsMeetingAddin\1.0.19317.2\x86\Microsoft.Teams.AddinLoader.dllthis version number in I pasted might be different, Based on what you have installed. (edited) 

Then about 5 minutes later, this was showing

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.