AutomoxAutomox

Worklet: Uninstall TeamViewer on Windows

vienna
March 17, 2021 at 5:29 pm UTC

Hi all, we had a couple machines that had TeamViewer installed and needed to mass uninstall, thought I’d share the Worklet to uninstall this

Evaluation:

powershell10 lines
if (Test-Path -Path "C:\Program Files (x86)\TeamViewer") 
{
	Write-Output "TeamViewer not installed, skipping" 
	exit 0
} 
else 
{ 
	Write-Output "TeamViewer installed, we will uninstall" 
	Exit 1 
}

Remediation:

powershell4 lines
$AllApps = Get-ItemProperty "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$TeamViewer = $AllApps | Where-Object {$_.DisplayName -Like "TeamViewer*"}
Write-Output "Uninstalling TeamViewer" 
Start-Process -FilePath ($TeamViewer.UninstallString) -ArgumentList "/S" -WindowStyle Hidden

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (3)

ORORMay 26, 2021
#1

It does not work for me!

imparted_logicMay 26, 2021
#2

I believe versions prior to 15 did not register as installed in that registry key. I use the following to remove both versions of Full and Client:

#TeamViewer Host Upgrade
Start-Process -FilePath msiexec.exe -ArgumentList “/x {731F6BAA-A986-45A4-8936-7C3AAAAA760B} /qn”
#TeamViewer Full Upgrade
Start-Process -FilePath msiexec.exe -ArgumentList “/x {150798A5-21DE-431E-BDC7-A822769BE9A2} /qn”
#TeamViewer Host
Start-Process -FilePath msiexec.exe -ArgumentList “/x {010C06FC-749F-41C3-9D7D-28C17D673A7A} /qn”
#TeamViewer Full
Start-Process -FilePath msiexec.exe -ArgumentList “/x {2B4FB49C-C477-4EB2-8477-5D95B84E8D5F} /qn”

jhammanSeptember 17, 2021
#3

Thanks for this post. We actually mass deploy with host (client) but with Covid, we have started to use Full on staff machines to help remote assist our patrons so this helps remove the client (which breaks the link) and will tweak to install the Full version.