Created
October 27, 2020 13:33
-
-
Save kasuken/ba890c12a2d1770b5b012693af040cdd to your computer and use it in GitHub Desktop.
Change Teams Language from PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$configPath = "$ENV:APPDATA\Microsoft\Teams\desktop-config.json"; | |
$cookiesFilePath = "$ENV:APPDATA\Microsoft\Teams\Cookies" | |
$cookiesJournalPath = "$ENV:APPDATA\Microsoft\Teams\Cookies-journal" | |
$teams = Get-Process Teams -ErrorAction SilentlyContinue | |
if ($teams) { | |
Stop-Process -Name Teams -Force | |
} | |
Start-Sleep -s 5 | |
try { | |
Remove-Item $cookiesFilePath -Force | |
} | |
catch {} | |
try { | |
Remove-Item $cookiesJournalPath -Force | |
} | |
catch {} | |
$teamsConfigJson = (Get-Content -path $configPath) | ConvertFrom-Json | |
$teamsConfigJson.currentWebLanguage = "de-CH" | |
$teamsConfigJson | ConvertTo-Json -Depth 10 | Set-Content -Path $configPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment