Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # uninstall Webex Teams x64 MSI
- # Per-user install (default)
- # I need to use a different approach for per-user.
- # WMI is slow, but registry doesn't give me all the info I need
- # to universally track down the product GUID.
- ###################
- $Transcript = $env:TEMP + "\WebEx_Teams-Unisntall_Transcript.log"
- Start-Transcript -Path $Transcript
- #######################################
- $AppName = "Webex Teams"
- ##################################################################
- # Kill running instances of this app.
- Write-Output "* Killing running processes..."
- Get-Process | ? {$_.path -like "*Cisco Spark*"} | % {$_ | Stop-Process -Force -Verbose}
- Get-Process | ? {$_.path -like "*CiscoCollab*"} | % {$_ | Stop-Process -Force -Verbose}
- ################
- # Exact match this time
- Write-Output "* Finding the app..."
- $AppInfo = gwmi win32reg_addremoveprograms | ?{$_.displayname -eq $AppName}
- #####################
- $Version = $AppInfo.Version
- $LogFile = $env:TEMP + "\" + $AppName + "_" + $Version + "-Uninstall.log"
- $AppGuid = $AppInfo.ProdID
- ##########
- $AppInfo | select *
- Write-Output "* Uninstalling..."
- & MsiExec /x $AppGuid /q /norestart /log $LogFile | Wait-Process
- #########################
- Stop-Transcript
Add Comment
Please, Sign In to add comment