Users frequently run out of disk space on their N: drives, the usual result is that they cannot run MS Teams.


The batch file below, is configured to run under the following policies; Staff and Staff Macros Enabled 


@echo off

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\blob_storage\*"

FOR /D %%p IN ("\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\blob_storage\*") DO rmdir "%%p" /s /q

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\Cache\*"

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\databases\*"

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\gpucache\*"

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\IndexedDB\*"

FOR /D %%p IN ("\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\IndexedDB\*") DO rmdir "%%p" /s /q

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\Local Storage\*"

FOR /D %%p IN ("\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\Local Storage\*") DO rmdir "%%p" /s /q

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\tmp\*"

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\backgrounds\*"

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\Teams\Service Worker\CacheStorage\*"



rem *** Deletes temporary Powerpoint files ****


@echo off

del /F/Q/S "\\gfs-svr-003\%Username%$\My Settings\Application Data\Microsoft\PowerPoint\*"


See RMMC