Clear MS Teams Cache

A lot of people going through Teams crashing issues etc. Unfortunately there is definite solution for this issue except uninstall Office suite and reinstall it. Ideally I wouldn’t do it for corporate environment where 100s of 1000s of users are affected. I have had these issues at a client’s site. Clearing cache for Teams worked in my case. Have a look at the code below. Copy it and paste it in a file in notepad or your favorite editor. Save file as anything.cmd (mine is TeamsCache.cmd). Run/Deploy this CMD using SCCM or Intune (MEM). I may post step by step at a later time on how to deploy this Script using SCCM or Endpoint Manager.

@ECHO OFF
goto:main

 [+] Description: Clear Teams Cache
 
:main

taskkill /f /t /fi "IMAGENAME eq teams.exe"
echo "[x] Microsoft Team Processes were closed!!!!"
del /f /q "%appdata%\Microsoft\teams\application cache\cache\*.*" > nul 2>&1
del /f /q "%appdata%\Microsoft\teams\blob_storage\*.*" > nul 2>&1
del /f /q "%appdata%\Microsoft\teams\databases\*.*" > nul 2>&1
del /f /q "%appdata%\Microsoft\teams\GPUcache\*.*" > nul 2>&1
del /f /q "%appdata%\Microsoft\teams\IndexdDB\*.db" > nul 2>&1
del /f /q "%appdata%\Microsoft\teams\Local Storage\*.*" > nul 2>&1
del /f /q "%appdata%\Microsoft\teams\tmp\*.*" > nul 2>&1
echo "[+] Microsoft Team's Cache was cleaned!!!"
C:\Users\%USERNAME%\AppData\Local\Microsoft\Teams\Update.exe --processStart Teams.exe
echo "[+] Microsoft Team Started!!!"
echo "DONE"

Add a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.