I am using Powershell scripts to install and uninstall different programs trough RMM software. Usually those scripts run without a problem but i noticed for teamviewer it gets stuck. I tried the following uninstall commands locally and found out teamviewer gives a prompt even though the arguments in the command are for a silent uninstall.
Start-Process -Wait -FilePath "C:\Program Files\TeamViewer\uninstall.exe" -ArgumentList "/S" -PassThru
Start-Process -Wait -FilePath "C:\Program Files\TeamViewer\uninstall.exe" -Argument "/silent" -PassThru
Start-Process -Wait -FilePath "C:\Program Files\TeamViewer\uninstall.exe" -ArgumentList '/S','/v','/qn' -passthru
Does anybody know what i am doing wrong or what a workaround can be or a different solution? I found this solution: https://silentinstallhq.com/teamviewer-install-and-uninstall-powershell/ But that is not what i am looking for, i don't want to install a different program just to be able to uninstall TeamViewer silently.