2021-09-30 08:14:30 -04:00
|
|
|
## Stop all instances of Teams
|
2021-09-30 08:11:57 -04:00
|
|
|
End-Process -Name "Teams" -Match -Force
|
|
|
|
|
|
2022-03-24 16:41:49 -04:00
|
|
|
## Remove all cached content
|
|
|
|
|
$CacheDir = "${Env:LOCALAPPDATA}\Microsoft\Teams"
|
|
|
|
|
If ( Test-Path $CacheDir ) {
|
2022-03-24 16:48:37 -04:00
|
|
|
LogMsg "Removing all cached data for Microsoft Teams"
|
2022-03-24 16:41:49 -04:00
|
|
|
Try { Remove-Item $CacheDir -Recurse -Force }
|
|
|
|
|
Catch { LogErr $_.Exception.Message }
|
|
|
|
|
} Else { LogMsg "Could not clear cached data for Microsoft Teams because the directory could not be found: ${CacheDir}" }
|