peter-supply Teams always has been a PITA installation wise (classic and new teams). We just completed deploying new teams to our VDI and non-VDI destops following this https://learn.microsoft.com/en-us/microsoftteams/new-teams-bulk-install-client
for installing AddIn (System wide install) on VDI we used this code:
#Get Installation folder of Teams AppX package
$MSTeams_AppX_Install_Folder = Split-Path (Get-ProvisionedAppPackage -Online|Where-Object -Property DisplayName -Like "MSTeams").InstallLocation
#Get Version from MicrosoftTeamsMeetingAddInInstaller.MSI
$MicrosoftTeamsMeetingAddInInstaller_Version = Get-AppLockerFileInformation -Path "$MSTeams_AppX_Install_Folder\MicrosoftTeamsMeetingAddInInstaller.msi" | Select -ExpandProperty Publisher | select BinaryVersion
#Compose TargetDir
$TargetDir = "$(${env:ProgramFiles(x86)})\Microsoft\TeamsMeetingAddin\$($MicrosoftTeamsMeetingAddInInstaller_Version.BinaryVersion.ToString())\"
#Install Parameters
$MicrosoftTeamsMeetingAddInInstall_Params = "/i `"$MSTeams_AppX_Install_Folder\MicrosoftTeamsMeetingAddInInstaller.msi`" ALLUSERS=1 /qn /norestart TARGETDIR=`"$TargetDir`""
#Install
$Install = Start-Process "msiexec.exe" -ArgumentList $MicrosoftTeamsMeetingAddInInstall_Params -PassThru -Wait
#Check exitcode if succesfull installed
If (($install.ExitCode -ne 0) -and ($install.ExitCode -ne 3010)) {
#Install Failed
$InstallExitCode = 1
}
Else{
#Install Succes
$InstallExitCode = 0
}
For regular install just install the MSI without additional parameters