
Double click it and then click to “Add” a new script. I added the batch script to both by double clicking on them one at a time. You will see two options Startup and Shutdown. Give it a name such as “Remove Teamviewer” and then navigate to the “Scripts” section under “Computer Configuration”. Now that you have your batch script created open your Group Policy Management console, right click on the name of your domain and select “Create a GPO in this domain, and Link it here” The if statement is just used to check if Teamviewer is installed before calling the uninstaller. You just need to invoke the uninstaller with the /S flag to remove Teamviewer without any user interaction. The benefit that I had discovered while scouring the web was that Teamviewer actually has a built in silent uninstaller. If exist "C:\Program Files (x86)\TeamViewer\uninstall.exe" "C:\Program Files (x86)\TeamViewer\uninstall.exe" /S Create the file “remove_teamviewer.bat” on the desktop of your Domain Controller and paste the below text into the file. The main piece of the puzzle comes in the form of a simple batch file. I am posting my steps here for my own reference and in case it may assist someone else in the future.


After some time spent searching the web I found a way. Rather than go from workstation to workstation I thought there must be a way to do this by utilizing Group Policy in Active Directory. I recently was tasked with removing Teamviewer from all of the computers in a client’s network.
