Skip to content
Home » Blog » Microsoft Teams disable audio/video in Citrix VDI but allow it on all other clients!

Microsoft Teams disable audio/video in Citrix VDI but allow it on all other clients!

Microsoft Teams is based on user policies, which makes it hard to target specific platforms where you might want to disable specific features. When Ahmed Hamed (LinkedIn) and I started to investigate how to accomplish this we were unable to find any good documentation or blogs on how to do this.

Our end goal was to accomplish the following:

  1. Disable all resource intensive features such as: audio/video calls, meetings and screensharing on the Citrix environment
  2. Allow users to still use all other features in Citrix like chat and sharing files
  3. Allow users to use all features outside of Citrix

To accomplish the above you need to set the following settings in Citrix Policy:

To perform the other steps, we used the new TeamsVdiPolicy Powershell module:

https://docs.microsoft.com/en-us/microsoftteams/teams-for-vdi#disable-audio-and-video-settings-for-vdi

1. Firstly, install the newest Microsoft Teams module: 

Install-Module -Name MicrosoftTeams -Force -AllowClobber 

Please check if the VDI PowerShell commands are present by running:

Get-Command -Noun *VDI*

If the commands are missing, please run the following PowerShell command:

Update-Module -Name MicrosoftTeams -AllowPrerelease

2. Connect with your Teams environment with:

Connect-MicrosoftTeams

3. Create a CsTeamsVdiPolicy to disable all audio and video inside your VDI environment:

New-CsTeamsVdiPolicy -Identity DisableCallsAndMeetingsTrue -DisableCallsAndMeetings $true -DisableAudioVideoInCallsAndMeetings $false 

After this a policy called ‘DisableCallsAndMeetingsTrue ’ with the setting ‘DisableCallsAndMeetings’ set on true (the standard setting is set on false) is created.

Sidenote: If you are getting an error message with the following:
“Connecting to remote server api.interfaces.records.teams.microsoft.com failed with the following error message: The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration.” You need to change some registry keys and set the value to ‘1’:

4. To check the created policy, run the following command:

Get-CsTeamsVdiPolicy | FT Iden*, Disable*

5. Now we must assign the policy to a specific user by running the following command:

Grant-CsTeamsVdiPolicy -Identity user@domain.com -PolicyName DisableCallsAndMeetingsTrue 

If you want to change the Global policy, please run the following command:

Set-CsTeamsVdiPolicy -Identity Global -DisableCallsAndMeetings $true

6. After this is done, please check if the policy is active for the user. This takes about 10 minutes:

get-CSOnlineUser -identity 'UPN' | FL UserPrincipalName, *vdi*

In the end you will have the following Teams client experience:

  1. Teams About shows nothing about any optimization (HDX optimized)
  2. Teams has greyed-out the audio and video buttons
  3. Joining meetings results in an error that the policy prevents this
Error message after joining a meeting
Greyed-out video and audio buttons

Thanks to James for his articles on how to optimize Team in Citrix! See the blogs:

https://james-rankin.com/articles/microsoft-teams-on-citrix-virtual-apps-and-desktops-part-1-installing-the-damned-thing/

https://james-rankin.com/articles/microsoft-teams-on-citrix-virtual-apps-and-desktops-part-2-default-settings-and-json-wrangling/

https://james-rankin.com/articles/microsoft-teams-on-citrix-virtual-apps-and-desktops-part-3-18-tips-for-optimizing-performance/

Based on these articles we did the following:

1. Remove Autorun:

2. Remove default shortcut

3. Set default JSON

{
   "appPreferenceSettings": {
      "runningOnClose": true,
      "disableGpu": true,
      "callingMWEnabledPreferenceKey": false
   },
   "theme": "default"
}

4. Set the following Ivanti Workspace User Settings:

5. With the following exceptions for %appdata%\Microsoft\Teams:

Leave a Reply

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