Teams is a super-app with multiple plugins and sub-apps that can cause some troubles from time to time.
Here are some tips to fix and to prevent a lot of small troubles and performance botlenecks.
# Closes Microsoft Teams process
taskkill /IM teams.exe /F /T
# Defines the policy for this script.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
# Removes specific safe to remove cache files from 3 locations
Get-ChildItem -Path ([System.Environment]::ExpandEnvironmentVariables("%AppData%\Microsoft\Teams")) -Directory `
| Where-Object { $_.Name -in ('blob_storage', 'Cache', 'Application Cache', 'Code Cache', 'databases', 'GPUCache', 'IndexedDB', '') } `
| ForEach-Object { Remove-Item $_.FullName -Recurse -Force };
Get-ChildItem -Path ([System.Environment]::ExpandEnvironmentVariables("%AppData%\Microsoft\Teams\meeting-addin")) -Directory `
| Where-Object { $_.Name -in ('Cache', '') } `
| ForEach-Object { Remove-Item $_.FullName -Recurse -Force };
Get-ChildItem -Path ([System.Environment]::ExpandEnvironmentVariables("%AppData%\Microsoft\Teams\Service Worker")) -Directory `
| Where-Object { $_.Name -in ('CacheStorage', 'ScriptCache', '') } `
| ForEach-Object { Remove-Item $_.FullName -Recurse -Force };
# Closes Microsoft Teams process
taskkill /IM teams.exe /F /T
# Defines the policy for this script.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
Get-ChildItem -Path ([System.Environment]::ExpandEnvironmentVariables("%appdata%")) -Directory `
| Where-Object { $_.Name -in ('Teams', '') } `
| ForEach-Object { Remove-Item $_.FullName -Recurse -Force };
Get-ChildItem -Path ([System.Environment]::ExpandEnvironmentVariables("%Programdata%")) -Directory `
| Where-Object { $_.Name -in ('Teams', 'SquirrelMachineInstalls', '') } `
| ForEach-Object { Remove-Item $_.FullName -Recurse -Force };
- C:\Users<username>\AppData\Local\Microsoft
- C:\Users<username>\AppData\Roaming\Microsoft
- C:\Users<username>\AppData\Roaming
reboot system