Remove Teams chat (personal) from Windows 11 using PowerShell and Endpoint Manager Intune
How to uninstall Teams personal app from Windows 11 (for All users) with a PowerShell script deployed using Microsoft Endpoint manager (Intune)
Windows 11 Teams Versions
Teams chat (for personal use) which is installed by default and the Teams desktop app which is installed with Microsoft 365 or using the Teams desktop installer.
Teams chat can only be used with personal Microsoft accounts
Most business environments will be using the Teams desktop app, and in that case you'll want to remove the Teams personal app from all of your Windows 11 devices.
The Teams personal app has a link to download Teams "work" version
Uninstall Teams (personal) from Windows 11 using PowerShell
Get Teams appx package name
Get-AppxPackage -name *teams*
Copy the package name "MicrosoftTeams"
Uninstall Teams app for All users using PowerShell
Get-AppxPackage -Name MicrosoftTeams -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Deploy PowerShell script to remove Teams using Endpoint Manager
Microsoft Endpoint Manager admin center
Devices - Windows
PowerShell Scripts - Add
Name: Windows 11 Remove Teams Personal
Script settings:
Select the PowerShell script remove-teams-personal.ps1
Run this script using the logged on credentials: No
Enforce script signature check: No
Run script in 64 bit PowerShell: No
Because we are uninstalling Teams for All users, the script will run in the System context.
Run this script using the logged on credentials: No
Asignments:
Assign the PowerShell script to a test group of devices or a group containing Windows 11 computers
Add groups
Select the "Windows 11 - Surface Devices" dynamic group
Click add
After you've uninstalled Teams personal, you'll also need to disable the Teams Chat icon on the Windows 11 Taskbar
Remove Teams chat icon from Windows 11 Taskbar using Endpoint Manager (Intune)
Reference:
by Author
Managing the Teams Chat icon on Windows 11
https://learn.microsoft.com/en-us/troubleshoot/windows-client/application-management/managing-teams-chat-icon-windows-11
Comments