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 MDM policy CSP configurechaticonvisibilityonthetaskbar available. As we can see in the documentation we can configure the setting to three values, I set it to Disabled (3).

To deploy the policy setting with Intune, we need to use a Custom configuration profile.

  • Sign in to the Microsoft Endpoint Manager admin center
  • Browse to DevicesWindowsConfiguration profiles
  • Click +Create profile
  • Select Windows 10 and later as Platform
  • Select Templates as Profile type
  • Select Custom
  • Click Create
  • Give the profile a Name
  • Enter a Description (Optional)
  • Click Next
  • On the settings tab click Add
  • Give the Row a Name
  • Fill in the OMA-URI:
    ./Device/Vendor/MSFT/Policy/Config/Experience/ConfigureChatIcon
  • Data type: Integer
  • Value: 3

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.




7 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.

Leave a Reply

Your email address will not be published.


*