In this step-by-step guide I will describe how-to disable GPU Hardware Acceleration for Teams in Citrix for all users. If the Virtual Desktop does not have a GPU/vGPU, Citrix recommends to disable GPU hardware acceleration in Teams (link). This cannot be done by policy or registry but by editing a json-file in the AppData directory.
I will describe in this article how I managed this with a simple Powershell script which you can run at logon.
Preparations
- Administrator privileges are required
- User policy needed for placing the startup script
Create or use a user-based policy where you want to use the Powershell script and use the contents of the script below. This script will first check if the json-file is present. If not, the user have never started Teams and the json-file is not present and will therefor not be edited.
$configPath = "$env:APPDATA\Microsoft\Teams\desktop-config.json"
$FileExists = Test-Path $configPath
if ($FileExists -eq $true) {
$a = Get-Content $configPath | ConvertFrom-Json
if ($a.appPreferenceSettings -match "disableGpu") {
$a.appPreferenceSettings.disableGpu = $true
} else {
$a.appPreferenceSettings | Add-Member -Name "disableGpu" -MemberType NoteProperty -Value $true
}
$a | ConvertTo-Json | Set-Content $configPath
}