Retire Microsoft Teams Classic and deploy the New Teams MSIX client to Windows endpoints with one policy
This Automox Worklet™ retires Microsoft Teams Classic and installs the New Microsoft Teams MSIX client on Windows endpoints. The Worklet handles the three installation surfaces Teams Classic actually uses on a real fleet: per-user Squirrel installs under each profile's AppData, the Teams Machine-Wide Installer MSI in ProgramData, and provisioned AppX packages baked into the image.
The evaluation script queries Get-AppxPackage -AllUsers for the MSTeams_8wekyb3d8bbwe package family. If that package is present, the endpoint is compliant and the Worklet exits without further work. If it is missing, remediation runs the full cleanup sequence and then drives Microsoft's teamsbootstrapper.exe to provision the MSIX. The bootstrapper is the supported Microsoft path for organization-wide deployment and writes the MSIX into the All Users provisioning store.
Cleanup walks every user profile under C:\Users and enumerates HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall and HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for Teams Classic uninstall strings. The Worklet calls Update.exe --uninstall /s for AppData installs, msiexec /x with /qn for the Machine-Wide Installer, and Remove-AppxPackage / Remove-AppxProvisionedPackage for AppX residue. Start Menu shortcuts pointing at the old Teams executable are also removed so the next user sign-in does not relaunch Classic.
Bootstrap downloads the architecture-appropriate MSIX (MSTeams-x64.msix or MSTeams-x86.msix) and teamsbootstrapper.exe directly from the Microsoft fwlink endpoints, then invokes the bootstrapper with the -p flag to provision the MSIX for all users on the endpoint. The script exits 0 on a clean install and a non-zero status with diagnostic output in Automox activity logs on any failed step.
Microsoft Teams Classic reached end of availability on March 31, 2024, and Microsoft has continued to retire the Classic backend on a rolling schedule. New sign-ins to Classic now fail in many tenants, calling and meeting paths are being deprecated, and the Classic client no longer receives security updates. Every endpoint still running Teams Classic is a help-desk ticket waiting on a single laptop, and the per-user Squirrel installer makes manual cleanup tedious because Teams writes itself into every profile rather than into Program Files.
Microsoft has end-of-lifed Classic Teams, and the supported migration path runs teamsbootstrapper.exe against a pinned MSTeams-x64.msix to provision the per-user AppX package. Performing that bootstrap on every Windows endpoint by hand means a PowerShell session per host and a manual compliance check afterward. This Worklet replaces that loop with a single policy that holds the cutover state on every evaluation and reports compliance back as soon as the New Teams AppX package is provisioned.
Evaluation phase: The script runs Get-AppxPackage -AllUsers and filters for Name -eq 'MSTeams' (publisher 8wekyb3d8bbwe). If the package is present and not in a Staged or PartiallyStaged state, the endpoint is reported compliant and remediation is skipped. If the query returns nothing or the package is incomplete, the endpoint is flagged non-compliant and the remediation script is scheduled on the next policy run.
Remediation phase: Remediation first removes Teams Machine-Wide Installer with msiexec.exe /x {GUID} /qn /norestart, then iterates every directory under C:\Users to call Update.exe --uninstall -s --installerName Teams.exe against AppData\Local\Microsoft\Teams. AppX packages matching MSTeams, MicrosoftTeams, and Microsoft.MSTeams are removed for each user with Remove-AppxPackage and stripped from provisioning with Remove-AppxProvisionedPackage. Residual folders, Squirrel update.exe, and Start Menu .lnk files are deleted. The script then downloads teamsbootstrapper.exe and MSTeams-x64.msix from the Microsoft fwlink CDN into the Automox working directory and runs teamsbootstrapper.exe -p -o "$tempDir\MSTeams-x64.msix". Wait-Process gates the script on bootstrapper completion, then the evaluation check is re-run inline to confirm the MSTeams package now appears in Get-AppxPackage output.
Windows 10 22H2 or Windows 11 endpoint meeting Microsoft's New Teams prerequisites (4 GB RAM minimum, WebView2 Runtime present)
Network reachability to go.microsoft.com/fwlink for teamsbootstrapper.exe (fwlink/?linkid=2243204) and MSTeams-x64.msix (fwlink/?linkid=2196106)
AppX/MSIX provisioning enabled on the endpoint; the Automox agent already runs as SYSTEM, which satisfies Add-AppxProvisionedPackage privilege requirements
Allow up to 300 seconds for the bootstrapper to complete the MSIX provisioning step; the script default timeout is set to 300 and surfaces a non-zero exit if bootstrapper does not return in time
Users will need to sign in to New Teams once after the cutover; chat history is rehydrated from the Microsoft 365 service rather than from local Classic state
Schedule the policy outside an active Teams meeting; the remediation script terminates any running Teams.exe process before uninstall
After successful remediation, Get-AppxPackage -AllUsers | Where-Object Name -eq 'MSTeams' returns the MSTeams_8wekyb3d8bbwe package with InstallLocation under C:\Program Files\WindowsApps. The Teams Machine-Wide Installer no longer appears in HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall, no Update.exe Squirrel binary remains under AppData\Local\Microsoft\Teams in any user profile, and Get-AppxProvisionedPackage -Online no longer lists the legacy MicrosoftTeams provisioning entry. Subsequent Automox evaluations report the endpoint compliant without re-running remediation.
To validate from the endpoint, run Get-AppxPackage MSTeams in an elevated PowerShell session and confirm the Status field reads Ok. Launch ms-teams: from a user session to verify the URI handler resolves to the new client rather than to a missing Classic shortcut. The Teams Meeting Add-in for Microsoft Office installs separately and continues to show up in Add or Remove Programs after the cutover – that is expected and does not indicate Classic is still present. Capture the remediation script's exit code and the final Get-AppxPackage output as audit evidence for the policy run.


Loading...
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklets deploy named-CVE mitigations within hours of disclosure, perform configuration, remediation, and install or remove applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy
By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in