In this blog article I describe the functionality (documentation) of my latest script for Microsoft Teams.
It is about deleting the Teams cache for one or more users.
This can be done in different ways.
On the one hand, there is a really great tool by Johannes Huber under the following link:
The problem here, however, is that this tool must be run on each affected device.
In principle, this is much easier. We can execute a small BAT file which also deletes the team cache.
However, it becomes more difficult with the following points:
How can I distribute this BAT file to the user computers that are affected? How can I ensure that the BAT file is only executed once? How can the script be executed so that the user does not have to interact? Finally, how can we ensure logging?
I have addressed these questions and written a PowerShell script that solves all these problems.
The script is written in such a way that we can distribute it via Microsoft Intune.
What happens during the second execution of the script?
Script packaging for Microsoft Intune
|In the Endpoint Manager Portal we go to Devices > Scripts
|Click on Add
|Give the process a name
|Select the script and use the configurations as shown in the picture.
|Assign the script to the appropriate group
|Complete the deployment.
|You can find the link to the script further down in this article. Here you can see transparently how it works and how the BAT file is configured.
As always, the following applies to my contributions: These are freely available to you and can be used free of charge. It is not allowed to resell my scripts! However, it is allowed to share them.
I recommend to test the script in a test environment before you use it in production. I do not take any responsibility for possible damage to the infrastructure.