Remove Personal Teams in Windows 11

In Windows 11 you will find a per-installed Teams personal client which in my opinion is confusing for our users.

So I decided to uninstall the Teams personal application (Appx) and remove the taskbar icon.

So we need 3 things to achieve the deletion of shortcut, delete application and be sure the application will not install again.
1. Remove the application
2. Create remediation
3. Remove the shortcut

To find more details about the Teams Appx you just open Powershell and enter this command :

Get-AppxPackage -Name MicrosoftTeams

To remove the app the following command can be used :

 Get-AppxPackage -Name MicrosoftTeams | Remove-AppxPackage

In our business we use Intune and Autopilot to manage devices so we deployed a powershell script to remove the application during ESP and we also deployed a proactive remediation so it does not re-install during an update or by a user.

  1. Remove the application

Deploy a script to a (Autopilot) group of devices. This can be used during ESP.

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

2. Create Remediation

To achieve this we need an detection and a remediation script.

# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
#Remediation Detect script
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
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
}



# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
# Remediation Delete script
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
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”
    }
}

3. Remove Teams Personal shortcut

To remove the icon from the Taskbar.
Create a new policy with the name Remove Teams Personal and add a setting.

Now search for Chat, click Experience and select Configure Chat Icon.
Select Disabled from the drop down list and Save the policy.

Now assign the policy to your Windows 11 devices.


More information :

PowerShell scripts – Create a script policy and assign it
https://docs.microsoft.com/en-us/mem/intune/apps/intune-management-extension#create-a-script-policy-and-assign-it

Proactive remediations – Deploy the script packages
https://docs.microsoft.com/en-us/mem/analytics/proactive-remediations

Use the settings catalog to configure settings
https://docs.microsoft.com/en-us/mem/intune/configuration/settings-catalog

Windows Autopilot Enrollment Status Page
Windows Autopilot Enrollment Status Page | Microsoft Learn

Troubleshooting the Enrollment Status Page
Troubleshoot the Enrollment Status Page (ESP) – Intune | Microsoft Learn

Leave a Reply

Your email address will not be published. Required fields are marked *