The Windows 11 taskbar includes the widgets and the teams chat by default. Neither is desired in corporate environments, especially the chat, which only works with a Microsoft consumer account, is mostly useless.
Luckily, both shortcuts can be easily removed with Intune. In order to get rid of the private teams chat completely, it must also be uninstalled before a user logs in. This can also be solved with Intune, a Win32 app or PowerShell script.
MEM / Intune Policy
With the help of Intune / the Microsoft Endpoint Manager we simply remove the teams chat and also the widgets from the Windows 11 taskbar. To set this, we create a configuration profile using the "Settings catalog".
- We create the profile under Devices> Windows> Configuration profiles
+ Create profile. - We point this out"Windows 10 and later" and the "Settings catalog" to.
- As a name, we choose a meaningful one (if available) that corresponds to the name concept.
- The settings are displayed in the "Configuration settings"/ "Add settings".
- Here we add the two settings "Configure Chat Icon" with the value "Disabled" and "Allow widgets" with the value "Not allowed" added.
- The quickest way to find them is to search.
- Finally, we assign the policy to a group or to all devices and complete the creation.
PowerShell & Registry
Unfortunately, the way via "Settings catalog" does not work with Windows 11 Pro and Windows 11 Business. Here you can achieve the result with the distribution of two PowerShell scripts. The first disables the widgets completely, the second sets the two keys in the user context.
Registry, deactivate Widgets system-wide
$Path = "HKLM:\\SOFTWARE\Policies\Microsoft\Dsh"
$Key = "AllowNewsAndInterests"
$KeyFormat = "DWord"
$Value = "0"
if(!(Test-Path $Path)){New-Item -Path $Path -Force}
Set-ItemProperty -Path $Path -Name $Key -Value $Value -Type $KeyFormat
Code language: PowerShell (powershell)
You can download the script under "Devices > Windows > PowerShell scripts + Add". Give the script a meaningful name and optionally a description. In the second step, you can upload the script shown above without making any adjustments.
Registry, Taskbar User Settings
$Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
$Key_Teams = "TaskbarMn"
$Key_Widgets = "TaskbarDn"
$KeyFormat = "DWord"
$Value = "0"
if(!(Test-Path $Path)){New-Item -Path $Path -Force}
Set-ItemProperty -Path $Path -Name $Key_Teams -Value $Value -Type $KeyFormat
Set-ItemProperty -Path $Path -Name $Key_Widgets -Value $Value -Type $KeyFormat
Code language: PowerShell (powershell)
You can also download the script under "Devices > Windows > PowerShell scripts + Add". Give the script a meaningful name and optionally a description. In the second step, you can upload the script shown above without making any adjustments. It is important that the script is executed in the user context assign and wait until the devices pull the configuration.
Uninstall Teams Chat
A PowerShell script allows you to uninstall either just the chat or other pre-installed applications (eg Xbox). It is important that the uninstallation is carried out before the user logs in to the device for the first time. We can either distribute a PowerShell script with Intune, which is run as a system, or pack the routine into a Win32 app.
I created a template and instructions for Win32 apps here: my take on win32 apps - Intune | scloud
# Uninstall Teams (Chat App) only
Get-AppxProvisionedPackage | Where {$_.packagename -like "*MicrosoftTeams*"} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
#-----------------------------------------------------------------
# Multiple Windows Apps, with log
$PackageName = "Remove-WindowsApps"
Start-Transcript -Path "$env:ProgramData\Microsoft\IntuneManagementExtension\Logs\$PackageName-script.log" -Force
# Programs to uninstall
$Packages2Remove = "MicrosoftTeams","skype","office","weather","map","zuneMusic","zunevideo","gethelp","officehub","solitaire","alarms","feedback","communication","yourphone","people","xbox","Getstarted","MixedReality","OneConnect","BingNews","Messaging","HP","Acer","Lenovo","xing"
foreach($Package in $Packages2Remove){
Get-AppxPackage -AllUsers | where-object {$_.name -like "*$Package*"} | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -online | where-object {$_.packagename -like "*$Package*"} | Remove-AppxProvisionedPackage -online -ErrorAction SilentlyContinue
}
Stop-Transcript
Code language: PowerShell (powershell)