Remove the built-in Teams client and chat icon from Windows 11

After modifying the start menu of Windows 11, I also want to remove the built-in Microsoft Teams client from the OS. And besides that, I also want to remove the chat icon from the taskbar.

I want to remove these because the chat icon starts the Teams client, and this client can only be used with a personal Microsoft account. So as long as we can’t use this client with corporate accounts, I don’t want this client on my corporate Windows devices.

Let’s see how easy it is to remove the Teams client and chat icon from Windows 11.

Remove the built-in Teams client

For Windows 10 we could use the store apps, and Microsoft Intune to uninstall the built-in Windows Store apps. For Windows 11, this seems not possible because of the changes in the Store.

Another solution for Windows 10, and also for Windows 11, is to use a PowerShell script to remove those apps from Windows. I first used the approach to use a PowerShell script, wrapped it as win32 app, and deployed it (during Autopilot enrolment). But this Microsoft Teams app seems to be installed over and over again (by Windows updates I assume), so I switched to using a script with Proactive remediations which is available with Microsoft Intune.
The benefit of using proactive remediations is that these scripts are not run once but at a repeated schedule. So if the app is reinstalled again, at the next scheduled run it is also removed again.

Proactive remediation consists of a detection script and a remediation script. In the remediation script, we check if the Teams app is installed by using the Get-AppxPackage command. But we first need to determine what the name of the app is. To retrieve the name from the Teams client, run below in PowerShell:

Get-AppxPackage -Name *teams*

With the remediation script, we remove the Teams app. This can be done by running:

Get-AppxPackage -Name MicrosoftTeams | Remove-AppxPackage -ErrorAction stop

With this information, we can create two simple scripts to get the job done.

This is our detection script:

#Script detects the new Microsoft Teams consumer app on Windows 11.

if ($null -eq (Get-AppxPackage -Name MicrosoftTeams)) {
	Write-Host "Microsoft Teams client not found"
	exit 0
} Else {
	Write-Host "Microsoft Teams client found"
	Exit 1

}

And this is our remediation script:

#Script removes the new Microsoft Teams consumer app on Windows 11.
#App is removed because this app can only be used with personal Microsoft accounts

try{
    Get-AppxPackage -Name MicrosoftTeams | Remove-AppxPackage -ErrorAction stop
    Write-Host "Microsoft Teams app successfully removed"

}
catch{
    Write-Error "Errorremoving Microsoft Teams app"
}

Let’s implement the proactive remediation.

  • Sign in to the Microsoft Endpoint Manager admin center
  • Browse to ReportsEndpoint AnalyticsProactive remediations
  • Click +Create script package
  • Enter a Name and Description (optional)
  • Click Next
  • Upload the Detection and Remediation script
  • Set Run this script using logged-on credentials to Yes
  • Set Run script in 64-bit PowerShell to Yes
  • Click Next

We can assign the remediation for example to All devices and use a filter to only run the scripts on Windows 11 devices.

When we click on Daily (under schedule) we can edit the schedule based on which the script is run.

The remediation script is scheduled and will remove the Teams app on a daily base.

Remove the chat icon

To remove the chat icon from the taskbar, we have the Configure chat icon setting available in the Settings Catalog in Intune.

  • Sign in to the Microsoft Endpoint Manager admin center
  • Browse to DevicesWindowsConfiguration profiles
  • Click +Create profile
  • Select Windows 10 and later as Platform
  • Select Settings Catalog as Profile type
  • Click Create
  • Give the profile a Name
  • Enter a Description (Optional)
  • Click Next
  • Click Add settings
  • Scroll down to Experience and select Configure chat icon
  • Set Configure chat icon to Hide

Save the configuration profile and deploy it to your Windows 11 devices.

End result

The end result is of course that the chat icon is removed from the taskbar, and I’ve only left the Microsoft Teams client which is installed as part of the Office suite.

That’s it for this post. Thanks for reading.




15 Comments

  1. Have you seen the personal Teams app reappear after uninstalling with a PS script like this? Others claim to have seen it, and use a different method to permanently solve the problem.
    TIA,
    Ed

    https://thenewnumber2.com/2021/10/25/removing-the-built-in-microsoft-teams-app-with-intune-take-two-a-better-approach/

    > My friend Loryan Strant (Check out his awesome wisdom here) reached out and mentioned that he has seen some occurrences of the built-in Teams app reappearing some time after the PowerShell Script has been run to remove the App.

      • So you are saying that this Proactive Remediation as listed above, will continue to keep the Teams built-in app uninstalled after the initial run? No manual intervention going forward?

  2. awesome work – i was able to follow the article and it delivered on the first attempt – good stuff man ! keep it up

  3. Since this is using logged-in user credentials, will it work for users that are not admins on their devices? Or, will we have to add a “-allusers” parameter to the script?

  4. As per
    https://docs.microsoft.com/en-us/mem/analytics/overview

    Proactive remediations also requires users of the devices to have one of the following licenses:

    Windows 10/11 Enterprise E3 or E5 (included in Microsoft 365 F3, E3, or E5)
    Windows 10/11 Education A3 or A5 (included in Microsoft 365 A3 or A5)
    Windows 10/11 Virtual Desktop Access (VDA) per user

    So won’t work with Microsoft 365 Business Premium?

  5. The proactive remediation script does not work for me I’m afraid, I had to add -Allusers after Get-AppxPackage in the detection script. And then the same thing after Get-AppxPackage and Remove-AppxPackage in the remdiation script. Nevertheless thank for the article it got me to where I need to be :).

    Detection
    if($null -eq (Get-AppxPackage -Allusers -Name MicrosoftTeams))
    {
    Write-Host “Microsoft Teams client not found”
    exit 0
    }
    Else{
    Write-Host “Microsoft Teams client found”
    Exit 1
    }

    Remediation
    #Script removes the new Microsoft Teams consumer app on Windows 11.
    #App is removed because this app can only be used with personal Microsoft accounts

    try {
    Get-AppxPackage -Allusers -Name MicrosoftTeams | Remove-AppxPackage -AllUsers -ErrorAction stop
    Write-Host “Microsoft Teams app successfully removed”
    }
    catch {
    Write-Error “Error removing Microsoft Teams app”
    }

Leave a Reply

Your email address will not be published.


*