If i run this locally on the machine after getting to the correct directory, the uninstall / install works great. But it's after I convert to intunewin file and upload to intune that i keep getting failed to install error.
Have the .msi as the "setup file" for intunewin. I originally had the .ps1 as set up, but that didn't work. I also verified i'm running it using the system account when deploying through intune.
$software = Get-Package -Name "TeamViewer 12 Host (MSI Wrapper)"
if ($software.Name -eq "TeamViewer 12 Host (MSI Wrapper)") {
Uninstall-Package -Name "TeamViewer 12 Host (MSI Wrapper)" -Force
}else{ Write-Host "Uninstalled" }
Start-Process msiexec.exe -ArgumentList '/i TeamViewer_Host.msi /qn CUSTOMCONFIGID=xxxxxx APITOKEN=xxxxxxxxxx ASSIGNMENTOPTIONS="--grant-easy-access --reassign"'