Microsoft Teams on AVD – Fix Meeting Add-in

Intro

Microsoft Teams is a great app for collaboration. On VDI systems like AVD however, it can be a challenge to install and present to users without any issues. This article is about installation and small workarounds.

Bootstrapper installer

  1. To install Microsft Teams on your AVD Image VM, start by downloading the Microsoft Teems bootstrapper:
    https://go.microsoft.com/fwlink/?linkid=2243204&clcid=0x409 
  2. Save the file to C:\Teams on your AVD Image VM
  3. Run PowerShell from C:\Teams with the following command:
    .\teamsbootstrapper.exe -p
  4. Wait until you see success:true

Instruct Teams to understand it is AVD/VDI

  1. Create a GPO that adds the following setting to REGEDIT of each AVD session host:

    You can use below PowerShell command to add to a server, so you can import from REGEDIT to GPO:
New-Item -Path "HKLM:\Software\Microsoft" -Name "Teams" -Force -ErrorAction Ignore
New-ItemProperty -Path "HKLM:\Software\Microsoft\Teams" -Type "DWord" -Name "IsWVDEnvironment" -Value 1 -force

It has been reported that Teams is not added to new users then deploying session hosts from image from compute gallery. Most likely Sysprep removes Microsoft Teams for all users setting. This can be fixed by creating a startup script that is applied to all session hosts:

The script contains the following lines of code: (you can remove # from the transscript lines if you need to troubleshoot and thereby enabling logging)

#Start-Transcript -OutputDirectory c:\Teams
C:\Teams\TeamsBootStrapper.exe -p
#Stop-Transcript
exit

Remote Desktop WebRTC Redirect

Remote Desktop WebRTC Redirector Service

  1. Download from Micosoft: https://aka.ms/msrdcwebrtcsvc/msi 
  2. Install on your AVD Image VM

Teams Meeting Addin Installer Issue

If the Outlook meeting add-in does not get installed in user sessions at logon, most likely you will see the msiinstaller error 1625 in the application event log on the AVD session host:

This is due to limitations in installations in user context on Windows 11 multi-session there restrictions have been applied. The workaround is to extract the installer, and make sure it installs for all users. This must be done each time Microsoft Teams is updated on the AVD Image VM. There are 2 methods. The first method is by using a script. The second method is to manually fix. Choose the method you prefer.

Use PowerShell to remediate

You can run this powershell script on your AVD Image VM to automatically remediate:

# Log to C:\temp - change this or comment it out if you do not want logging
#Start-Transcript -OutputDirectory c:\temp

# Get Version of currently installed new Teams Package
if (-not ($NewTeamsPackageVersion = (Get-AppxPackage -Name MSTeams -AllUsers).Version)) {
    write-output "New Teams Package not found. Please install new Teams from https://aka.ms/GetTeams ."
    Stop-Transcript
    exit 1
}

write-output "Found new Teams Version: $NewTeamsPackageVersion"

# Get Teams Meeting Addin Version

$TMAPath = "{0}\WINDOWSAPPS\MSTEAMS_{1}_X64__8WEKYB3D8BBWE\MICROSOFTTEAMSMEETINGADDININSTALLER.MSI" -f $env:programfiles,$NewTeamsPackageVersion

if (-not ($TMAVersion = (Get-AppLockerFileInformation -Path $TMAPath | Select-Object -ExpandProperty Publisher).BinaryVersion))

{
    write-output "Teams Meeting Addin not found in $TMAPath."
    Stop-Transcript
    exit 1
}

write-output "Found Teams Meeting Addin Version: $TMAVersion"

# Uninstall Teams Meeting Addin

try {
    $params = '/qn /x "{0}"' -f $TMAPath
Start-Process msiexec.exe -ArgumentList $params
}
catch{
    write-host "Error uninstalling Teams Meeting Addin. Most likely it is not installed in current users context."
}

# Install parameters
$TargetDir = "{0}\Microsoft\TeamsMeetingAddin\{1}\" -f ${env:ProgramFiles(x86)},$TMAVersion
$params = '/i "{0}" TARGETDIR="{1}" /qn ALLUSERS=1' -f $TMAPath, $TargetDir

# Start the install process
write-host "executing msiexec.exe $params"
Start-Process msiexec.exe -ArgumentList $params
write-host "Please confirm install result in Windows Eventlog"

# Adding Registry Keys for Outlook Addin for all users
New-Item -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins" -Name "TeamsAddin.FastConnect" -Force -ErrorAction Ignore
New-ItemProperty -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect" -Type "DWord" -Name "LoadBehavior" -Value 3 -force
New-ItemProperty -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect" -Type "String" -Name "Description" -Value "Microsoft Teams Meeting Add-in for Microsoft Office" -force
New-ItemProperty -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect" -Type "String" -Name "FriendlyName" -Value "Microsoft Teams Meeting Add-in for Microsoft Office" -force

#Stop-Transcript

Use manual UI method to remediate

  1. Navigate to the most current installation of Microsoft Teams on your AVD image. The path could be: “C:\Program Files\WindowsApps\MSTeams_25007.607.3371.8436_x64__8wekyb3d8bbwe”.
  2. Locate the file MicrosoftTeamsMeetingAddinInstaller.msi
  3. Copy the file to C:\Teams
  4. Run the installation.
  5. If the installation says the program is already installed, chose to remove the software.
  6. Run the installer again if you had to uninstall first.
  7. Then running the installer, CHANGE the installer path to(remember to change the numbers to match the numbers of the version you are installing): C:\program files (x86)\Microsoft\TeamsMeetingAdd-in\1.24.25506
  8. Create the following entries in REGEDIT in each AVD session host, by adding to a group policy (or other prefered method):

You can use below PowerShell command to add to a server, so you can import from REGEDIT to GPO:

New-Item -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins" -Name "TeamsAddin.FastConnect" -Force -ErrorAction Ignore
New-ItemProperty -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect" -Type "DWord" -Name "LoadBehavior" -Value 3 -force
New-ItemProperty -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect" -Type "String" -Name "Description" -Value "Microsoft Teams Meeting Add-in for Microsoft Office" -force
New-ItemProperty -Path "HKLM:\Software\Microsoft\Office\Outlook\Addins\TeamsAddin.FastConnect" -Type "String" -Name "FriendlyName" -Value "Microsoft Teams Meeting Add-in for Microsoft Office" -force

  1. Reboot AVD session host. Afterwards, users should be able to see the Teams Meeting options from the calendar in Outlook

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *