Microsoft Teams has evolved, and so have the methods to enhance your virtual meeting experience... kind of 😉
In this instructional and technical guide, I will walk you through the step-by-step process of the process to deploy a custom virtual background for the new version of the Microsoft Teams Client using Intune.
I will use a custom Win32 application for that based on PowerShell.
Table of Contents
- Difference between the Classic and the New Teams Client
- Script Explanation and Flow Chart
- Customize and Deploy the Package
- Update Your virtual Backgrounds
- Conclusion
Difference between the Classic and the New Teams Client
The main difference between the two clients is how the virtual backgrounds are stored. In the classic client, you could simply drop a PNG or JPG file into the right folder. In the new Teams client, you have to name the file with a GUID and place an additional thumbnail file with the same GUID in the same directory.
The locations are different as well:
Teams Classic
C:\Users\%username%\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads |
New Teams
C:\Users\%username%\AppData\Local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Backgrounds\Uploads |
Script Explanation and Flow Chart
The script is designed to make the whole process as simple as possible. My goal was that you can just put all your desired wallpaper in one folder, package the package and don't have to worry about anything else.
So, let's break down the script into key components:
- Preparing the Environment:
- The script starts by defining the package name and version for tracking purposes.
- It sets the local folder path where Microsoft Teams stores custom background images.
- Reference IDs and background folder are established.
- Cleanup of Old Files:
- The script checks for existing background files (deployed via a previous version of this package) and removes them.
- Old files are tracked in a CSV file for reference.
- Copying and Renaming Backgrounds:
- Custom background images are copied to the Teams folder and renamed with GUIDs to ensure they are visible to the user in the client.
- A thumbnail copy is also created for each background.
- Updating Reference IDs:
- The script updates the reference IDs in a CSV file to keep track of the installed backgrounds.
- Validation Key:
- A validation key is created to signify a successful installation.
Flow Chart
Customize and Deploy the Package
Preparing Your Backgrounds
First you can download my template here:
Before the technical stuff, gather custom background images and organize them in the folder labeled "bg." These images will be available to your users to choose from later.
Creating the Intunewin
Once you have your backgrounds in the folder you can create the Intunewin out of the whole package folder (Teams-Backgrounds). For that do this:
- Download the current Microsoft Win32 Content Prep Tool.
- Open the downloaded "IntuneWinAppUtil.exe"
- Provide the path to your package folder.
- Enter the installation file: install.ps1
- Enter the path where you want the .intunewin file to be stored.
- For the Catalog Folder question, we choose No (N).
- Done, now your ready to upload the package to Intune.
Deploying with Intune
With your intunewin package ready, deploy it using Microsoft Intune. Follow these steps:
- Login to Intune
- Navigate to: Apps > Windows
- Click +Add
- Choose: Windows app (Win32)
- Upload the install.intunewin
- Fill out at the App information:
- Name: Teams virtual Backgrounds
- Description: Adds the companies virtual backgrounds to each users profile.
- Publisher: Your Company name
- Logo: Teams-virtual-backgrounds.png or your own
- The Install and Uninstall command is:
- %SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -executionpolicy bypass -command .\install.ps1
- %SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -executionpolicy bypass -command .\uninstall.ps1
- Install behavior: user
- In the Requirements choose:
Operating system architecture: 64-bit
Minimum OS: what suites you, if you don't have special requirements choose 2004 - In the Detection rules choose "Manually configure detection rules" and set it to this registry key:
- Key path: HKEY_CURRENT_USER\Software\scloud\Teams-new-Backgrounds
- Value name: Version
- Detection method: String comparison
- Operator: Equals
- Value: 1
- You can skip the next three steps Dependencies, Supersedence and Scope tags
- In the Assignments add your desired groups and your good to go.
Testing and Troubleshooting
Before full deployment, test your setup in a controlled environment. If you have errors during the installation or don't get the desired result check the log which i write to the IntuneManagmentExtentions Logs:
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Teams-new-Backgrounds-%username%-install.log |
Since it's a user based installation you might see multiple logs, each one is for one particular user on the device.
Update Your virtual Backgrounds
If you decide to update your virtual Teams backgrounds, just create a new package like I showed you in this guide. The only thing you need to change is the version Number in the install.ps1 and in the detection rule in your Intune configuration:
After the version increases in your install.ps1 remember to recreate the intunewin and upload it in the existing Win32 app in Intune.
Conclusion
With this step-by-step guide, you've successfully branded Microsoft Teams for your users. The enhanced virtual background experience not only adds a technical touch but also fosters a sense of connection among team members. A more costly alternative for the deployment of Teams virtual backgrounds would be Teams Premium which would work without Intune.
Hi Florian,
Many thanks! This works perfectly! Currently the custom images are below all the default images. Do you know theres a way to put the custom image above all the other default images?
Unfortunately not, the defaults will always be on top (except for the active one).
Pictures you add through the Teams “Advanced Communications” add-on license will appear at the top of the list of images.