PowerShell, Intune: How to disable Teams GPU acceleration with Intune/GPO - Updated for new Teams

This is an update to this post.

Credit for this one goes to the user Dacid Salin.

Thanks Dacid. Much appreciated.

<#$FilePath = "C:\Users\"+ $env:UserName + "\AppData\Roaming\Microsoft\Teams\desktop-config.json" #>

<# Using Azure to sign into the comptuer but setup with my first initial/last name when reinstalling OS Therefore the c:\users\%username% is not the same as user profile path#>

$FilePath = $env:USERPROFILE + "\AppData\Roaming\Microsoft\Teams\desktop-config.json"

<# Check status. #>

<# $CheckFilePath = "C:\Users\"+ $env:UserName + "\AppData\Roaming\Microsoft\Teams\desktop-config.json" #>

<# Same issue as above #>

$CheckFilePath = $env:UserProfile + "\AppData\Roaming\Microsoft\Teams\desktop-config.json"

<#You need to delete this file for this to work#>

<# New Teams location is under the Network folder #>

<# $cookieFile =  "$env:userprofile\AppData\Roaming\Microsoft\teams\Cookies" #>

$cookieFile =  "$env:userprofile\AppData\Roaming\Microsoft\teams\Network\Cookies"

Del $cookieFile