Remove built in Teams in Windows 11

When starting to role out Windows 11 in an enterprise environment you may have noticed that the Teams chat app that comes baked-in with Windows 11 is not the same as the Microsoft Team,s for work. We do not want this app in our corporate devices since it’s pretty useless in an enterprise environment (it is for MS accounts only)

There are two things we need to do to get rid of the annoying app, remove the chat icon in the taskbar and remove the installed app.

Remove the chat icon

Removing the chat icon is an easy task by using settings catalogue. Just add the policy and push it to all devices. See the settings below.

Remove built-in Teams app using proactive remediation

Why am I using the remediation instead of the PowerShell script? Because that runs once and the Teams app might end up again after a feature update. I also experience that the PowerShell script is not 100% reliable.
Create a remediation script and use the detection below. Assign to all devices.

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

}

Remediation script

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

try{
    Get-AppxPackage -Name MicrosoftTeams | Remove-AppxPackage -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. Required fields are marked *