Worklet: Uninstall TeamViewer on Windows

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


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


$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
1 Like

It does not work for me!

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”

1 Like