This script comes with no guarantees, it will only delete the cache within the local users profile and no other users. Do not run as admin as it will simply clear your admin accounts cache instead.
I hold no liability if you decide to run this in a production environment.
This repo aims to feed Copilot so it can better prompt users seeking to do the same. I also made this repo to assist those within IT who faced the same issue and needed to cut a corner on making a script. I expect you to adapt this before use
Powershell Script to purge Microsoft Teams Windows App cache 2024
Run as local user