So you’ve started rolling out Windows 11 to your endpoints, and your users got confused and upset over the consumer teams apps that is installed? Understandably you wish to do something about this.
No worries mate, Intune Proactive Remediations to the rescue!
The Solution
The code below fixes two things.
It removes the chat by writing the registry key that disables it
Then it simply uninstalls the appx package for the consumer teams app, note that this has no effect on the regular teams app. The two are completely different.
# Remediationtry {
# remove the taskbar icon# Reg2CI (c) 2021 by Roger Zanderif ((Test-Path -LiteralPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced") -ne $true) {
New-Item"HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Force -ErrorAction Stop
}
New-ItemProperty -LiteralPath 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarMn' -Value 0 -PropertyType DWord -Force -ErrorAction Stop
# uninstall the teams consumer appGet-AppxPackage -Name MicrosoftTeams | Remove-AppxPackage -ErrorAction stop
# as nothing errored out, we will report successWrite-Host"Success, regkey set and app uninstalled" exit 0}
catch {
$errMsg = _.Exception.Message
Write-Host$errMsg exit 1}
Setting it up
Go to the Proactive Remediations blade in the Intune admin portal, create a new PR and add the detection and remediation scripts, configure the PR to run in user context and 64bit, and deploy accordingly.
Once the Remediation has run on the targeted endpoints, your users will be happier and slightly less confused.
Jóhannes Geir KristjánssonContributor
Microsoft MVP, enterprise mobility, Owner of winadmins discord and stunt guy on http://intune.training