do not uninstall teams

This commit is contained in:
2022-03-17 14:22:49 -04:00
parent a473e079f4
commit 13e32b62a2
+6 -6
View File
@@ -4,12 +4,12 @@ End-Process -Name "Teams" -Match -Force
If ( $Reinstall ) {
## Uninstall Teams for current user
$Uninstaller = "${Env:LOCALAPPDATA}\Microsoft\Teams\Update.exe"
If ( Test-Path $Uninstaller ) {
LogMsg "Uninstalling Teams for ${Env:USERNAME}"
Try { Start-Process $Uninstaller -ArgumentList "--uninstall" -Wait }
Catch { LogErr $_.Exception.Message }
} Else { LogMsg "Teams could not be uninstalled for ${Env:USERNAME}" }
# $Uninstaller = "${Env:LOCALAPPDATA}\Microsoft\Teams\Update.exe"
# If ( Test-Path $Uninstaller ) {
# LogMsg "Uninstalling Teams for ${Env:USERNAME}"
# Try { Start-Process $Uninstaller -ArgumentList "--uninstall" -Wait }
# Catch { LogErr $_.Exception.Message }
# } Else { LogMsg "Teams could not be uninstalled for ${Env:USERNAME}" }
## Remove all cached content
$CacheDir = "${Env:LOCALAPPDATA}\Microsoft\Teams"