Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $teamsProcess = Get-Process -Name "Teams" -ErrorAction SilentlyContinue
  2.  
  3. if($teamsProcess) {
  4.     Stop-Process $teamsProcess
  5.     Start-Sleep -Seconds 10 #Because I can't figure out how to block until Teams.exe is killed
  6. }
  7.  
  8. $userRootFolders = Get-ChildItem -Directory "C:\Users\"
  9. ForEach($folder in $userRootFolders) {
  10.     $cacheDB = Join-Path $folder.FullName "\AppData\Roaming\Microsoft\Teams\IndexedDB"
  11.     If(Test-Path($cacheDB)) {
  12.         Remove-Item -Recurse -Path $cacheDB
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement