This script (via Powershell) deletes the roaming profile cache(s) on the target machine. Helpful in a non persistent environment that hasn't used the "Machine Wide Installer".
I used this links as reference:
PowerShell Basics: How to Delete Microsoft Teams Cache for All Users
It wont delete in use files so if a user is logged on using teams it wont delete their files.
You can add a " -WhatIf " statement to the end (see below) and run locally to receive feedback to see what's going to be removed:
Get-ChildItem "C:\Users\*\AppData\Roaming\Microsoft\Teams\*" -directory | Where name -in ('application cache','blob storage','databases','GPUcache','IndexedDB','Local Storage','tmp') | ForEach{Remove-Item $_.FullName -Recurse -Force -WhatIf}
This script will also be subject to powershell access and application control/restrictions remote execution if its saved as a *.PS1 etc. I've used a *.BAT to run the script or as system account that's isn't restricted