This repository contains a PowerShell script to clear the cache for the new Microsoft Teams client (V2). This script is useful for administrators who want to ensure a clean state for Teams by removing old cache files.
- PowerShell
- Copy the
EmptyTeamsCacheV2.ps1
script to the following folder:C:\Windows\System32\GroupPolicy\User\Scripts\Logon
- The script will automatically run at user logon, clearing the Teams cache for the new Teams client.
- Have Teams on the login screen (All users logged out).
- Open PowerShell.
- Paste the script and run it.
-
Stops Microsoft Teams if it is running.
-
Deletes the following cache folders:
$env:LOCALAPPDATA\Packages\MSTeams_8wekyb3d8bbwe $env:LOCALAPPDATA\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy $env:LOCALAPPDATA\Microsoft\OneAuth $env:LOCALAPPDATA\Microsoft\TokenBroker $env:LOCALAPPDATA\Microsoft\IdentityCache
-
Restarts Microsoft Teams.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Joao Neisinger