blog.icewolf.ch

Let's talk about IT!
posts - 1802, comments - 295, trackbacks - 0

My Links

Archives

Post Categories

icewolf

Microsoft Teams clear local cache

Hallo zusammen,

Ich hatte kürzlich einen Fall, bei dem die Chatnachrichten in Teams zeitweise verschwunden sind. Hier kann es helfen, den lokalen Cache von Teams zu löschen.

Die Daten befinden sich hier %appdata%\Microsoft\Teams

Folgende Ordner sollten dafür gelöscht werden

Application Data\Microsoft\Teams\Application Cache
Application Data\Microsoft\Teams\Cache
Application Data\Microsoft\Teams\blob_storage
Application Data\Microsoft\Teams\databases
Application Data\Microsoft\Teams\Indexeddb
Application Data\Microsoft\Teams\Local Storage
Application Data\Microsoft\Teams\tmp
Application Data\Microsoft\Teams\Service Worker\CacheStorage
Application Data\Microsoft\Teams\Service Worker\ScriptCache

Dazu muss natürlich Teams beendet werden.

Ich habe ein kleines PowerShell Script dafür geschrieben.

###############################################################
# Powershell Script to delete the Teams Cache in %APPDATA%
# 09.06.2021 Andres Bohren
###############################################################
Write-Host "Teams wird beendet, um den Cache zu loeschen."
try{
 Get-Process -ProcessName Teams -ErrorAction SilentlyContinue | Stop-Process -Force
 Start-Sleep -Seconds 5
 Write-Host "Microsoft Teams wurde beendet."
} catch{
 echo $_
}

# Der Cache wird nun geloescht / geleert
try{
 If (Test-Path $env:APPDATA\"Microsoft\teams\application cache\cache")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\application cache\cache""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\application cache\cache" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\blob_storage")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\blob_storage""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\blob_storage" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\databases")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\databases""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\databases" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\cache")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\cache""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\cache" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\gpucache")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\gpucache""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\gpucache" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\Indexeddb")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\Indexeddb""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Indexeddb" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\Local Storage")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\Local Storage""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Local Storage" | Remove-Item -Recurse -Confirm:$false
 }
 If (Test-Path $env:APPDATA\"Microsoft\teams\tmp")
 {
  Write-Host "Delete > $env:APPDATA\"Microsoft\teams\tmp""
  Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\tmp" | Remove-Item -Recurse -Confirm:$false
 }
}
 catch{
 echo $_
}
write-host "Der Cache wurde erfolgreich geloescht / geleert."
write-host "Teams kann nun wieder gestartet werden"

Grüsse
Andres Bohren

Print | posted on Wednesday, June 9, 2021 10:23 PM | Filed Under [ Teams ]

Powered by:
Powered By Subtext Powered By ASP.NET