Remove Personal Teams from Windows 11

Windows 11 has a new Teams client that comes pre-installed with the OS, however this currently only works with personal accounts, which in a business environment, can cause confusion and frustration for users with the apps having similar icons and the fact it runs at startup.

Shows the different icons between business and personal Teams clients
Windows 11 inbox Teams app

There’s a couple of things that we’ll want to do to resolve this; uninstall the app and remove the icon from the Taskbar.

Remove the Teams (Personal) App

The Teams app that comes pre-installed with Windows 11 is an Appx package, so won’t appear in add/remove programs, but we can manage it via PowerShell.

Open PowerShell and use the following command to show the details about the Appx package.

Get-AppxPackage -Name MicrosoftTeams
Shows the output of the Get-AppxPackage command
Get-AppxPackage output

To remove the app, we can simply pipe the package information to Remove-AppxPackage as so:

Get-AppxPackage -Name MicrosoftTeams | Remove-AppxPackage

Step 1 - Remove during Autopilot

So step 1, a simple PS script that we can target at Win11 devices and include in the ESP for Autopilot to remove.

Start-Transcript -Path $env:TEMP\MSTeamsPersonalRemove.log
If ($null -eq (Get-AppxPackage -Name MicrosoftTeams -AllUsers)) {
    Write-Output “Microsoft Teams Personal App not present”
}
Else {
    Try {
        Write-Output “Removing Microsoft Teams Personal App”
        Get-AppxPackage -Name MicrosoftTeams -AllUsers | Remove-AppPackage -AllUsers
    }
    catch {
        Write-Output “Error removing Microsoft Teams Personal App”
    }
}
Stop-Transcript

Create a script in Intune and target it at either a group used for Autopilot or Windows 11 devices.

If you’re not familiar with creating scripts for deployment in Intune, follow the documentation here:
https://docs.microsoft.com/en-us/mem/intune/apps/intune-management-extension

Step 2 - Continuous Cleanup

While the script in step 1 can be rolled out to all devices as well as being used during Autopilot (using the ESP) there’s been some reports (I personally haven’t verified it) of the app getting re-installed after updates, but I have verified that it only takes clicking the “Chat” icon on the task bar to re-install it.

So just in case (and for some nice reporting) it makes sense to also create a Proactive Remediation (If you’re licensed to use the feature) that will keep it removed if it re-appears as well as cleaning up any Windows 11 devices already deployed in the environment.

For this we can adapt the above script and make both a detection and remediation script.

I’m not going to go through step by step how to create a Proactive Remediation. If you’re unsure I suggest checking out the tutorial on MS Docs:
https://docs.microsoft.com/en-us/mem/analytics/proactive-remediations

Proactive Remediation - Detection
If ($null -eq (Get-AppxPackage -Name MicrosoftTeams -AllUsers)) {
    Write-Output “Microsoft Teams Personal App not present”
    Exit 0
}
Else {
    Write-Output “Microsoft Teams Personal App present”
    Exit 1
}

Proactive Remediation - Remediate
If ($null -eq (Get-AppxPackage -Name MicrosoftTeams -AllUsers)) {
    Write-Output “Microsoft Teams Personal App not present”
}
Else {
    Try {
        Write-Output “Removing Microsoft Teams Personal App”
        If (Get-Process msteams -ErrorAction SilentlyContinue) {
            Try {
                Write-Output “Stopping Microsoft Teams Personal app process”
                Stop-Process msteams -Force
                Write-Output “Stopped”
            }
            catch {
                Write-Output “Unable to stop process, trying to remove anyway”
            }
           
        }
        Get-AppxPackage -Name MicrosoftTeams -AllUsers | Remove-AppPackage -AllUsers
        Write-Output “Microsoft Teams Personal App removed successfully”
    }
    catch {
        Write-Error “Error removing Microsoft Teams Personal App”
    }
}

These two steps will make sure we scrub the inbox Teams app from devices, however just in case and while we wait for it, it’s probably best if we reduce the risk of users launching it, so lets get rid of the icon from the Taskbar that’s present on all default Windows 11 installs.

Proactive remediation results showing issue fixed
Proactive Remediation results showing issue fixed

Remove the Taskbar icon

Unless you’re using ConfigMgr and customising during build, chances are the icon for “Chat” is present on the Taskbar after the Autopilot process and should be removed before users start clicking on it.

Thankfully there’s a policy in the Settings Catalog within Intune that we can use to remove it quickly.

Again, this isn’t a step by step, if you’re unsure then head to the MS Docs here:
https://docs.microsoft.com/en-us/mem/intune/configuration/settings-catalog

Create a new policy, add a setting and search for Chat

If you select the Experience category you’ll see the setting for Configure Chat Icon.

Find the setting to remove the chat icon in the settings catalog
Remove the Chat icon via the Settings Catalog

Select this setting and close the search window. By default the setting will be configured with Windows default so drop the list down and choose Disabled.

Setting configured to disabled
Setting configured to Disabled

Step through the rest of the policy and assign it as you wish to cover your Windows 11 devices. I’m going to target All devices, but use Filters to only include W365 devices for my initial testing.

Assigned to all devices but with a filter
Assigned to All Devices with a filter

When the policy applies, it will remove the option to toggle the Chat icon on and off from the Settings App > Personalization > Taskbar area, but the device will need a reboot before it’s removed from the actual Taskbar. Another reason why the Proactive Remediation is a good idea as you can almost guarantee a user will click it before a device reboots and therefore re-install it!

Screenshot showing the option to toggle the chat icon gone, but the icon still on the Taskbar until the device reboots.
Icon still present after policy applied until reboot

With the above information you should be able to remove and control access to the inbox Teams app that comes with Windows 11 that isn’t currently of use to businesses.

Feel free to drop a comment or reach out to myself and the team at PowerON if you have any questions or thoughts around this! 

Share on:

Windows Sandbox – Often forgotten, but useful tool

See how and why you should be using Windows Sandbox along with how we use it at PowerON.

Click Here

Windows Sandbox – Often forgotten, but useful tool

See how and why you should be using Windows Sandbox along with how we use it at PowerON.

Share on Facebook
Share on Twitter
Share on LinkedIn

Related blogs