Skip to content

Instantly share code, notes, and snippets.

@kasuken
Created October 27, 2020 13:33
Show Gist options
  • Save kasuken/ba890c12a2d1770b5b012693af040cdd to your computer and use it in GitHub Desktop.
Save kasuken/ba890c12a2d1770b5b012693af040cdd to your computer and use it in GitHub Desktop.
Change Teams Language from PowerShell
$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