Tired of seeing the Microsoft Store cluttering up your Intune-managed devices' taskbars? Here's how you can quickly and easily remove the Store from the taskbar using Intune, ensuring everyone uses Company Portal instead.

Table of Contents

Why Should I remove the Store from the taskbar?

In most of the deployments I manage, the use of the Microsoft Store is blocked. This is true for example if you have implemented CIS Baselines Level 1 or higher. However, even if the use of the store is blocked, it will still remain on your user's device to update store applications such as the company portal, calculator, and more. If the store is visible in a prominent location such as the taskbar, the user is likely to click on it and see the message "Microsoft Store is blocked… Contact your system administrator". This can lead to unnecessary confusion and support calls.

By unpin / remove the Store icon, you proactively help your users and maintain a consistent user experience. It also frees up valuable taskbar space for essential tools.

Old / Alternative Ways to remove the Store from the Taskbar

Registry Tweak

A very simple way is to set the option via a registry key. However, there's a catch: you have to reboot the device for the change to take effect.

If you select the Registry option, you can add the following registry key by using a PowerShell script or by some other method.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"NoPinningStoreToTaskbar"=dword:00000001
Code language: JavaScript (javascript)

PowerShell Script

Want more control and flexibility?
Opt for a PowerShell script deployed in the user context. This method automatically unpins the Store icon.

One thing that was a bit of a challenge for me was different OS languages. Cause the unpin command is different in each language. For example, in Englisch its "Unpin from taskbar" and in German "Von Taskleiste lösen".
This is why I use a custom function in my script called "Get-TaskVerb". This function gets the correct command regardless of the language.

Here's the script:

function Get-TaskVerb { 
    param([int]$verbId) 
    try { 
        $t = [type]"CosmosKey.Util.MuiHelper" 
    } catch { 
        $def = [Text.StringBuilder]"" 
        [void]$def.AppendLine('[DllImport("user32.dll")]') 
        [void]$def.AppendLine('public static extern int LoadString(IntPtr h,uint id, System.Text.StringBuilder sb,int maxBuffer);') 
        [void]$def.AppendLine('[DllImport("kernel32.dll")]') 
        [void]$def.AppendLine('public static extern IntPtr LoadLibrary(string s);') 
        add-type -MemberDefinition $def.ToString() -name MuiHelper -namespace CosmosKey.Util             
    } 
    if($global:CosmosKey_Utils_MuiHelper_Shell32 -eq $null){         
        $global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary("shell32.dll") 
    } 
    $maxVerbLength=255 
    $verbBuilder = new-object Text.StringBuilder "",$maxVerbLength 
    [void][CosmosKey.Util.MuiHelper]::LoadString($CosmosKey_Utils_MuiHelper_Shell32,$verbId,$verbBuilder,$maxVerbLength) 
    return $verbBuilder.ToString() 
} 

$apps = ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items())
foreach ($app in $apps){
    $appname = $app.Name
    if ($appname -like "*store*"){
        $finalname = $app.Name
    }
}

if($finalname){
    Write-Log "Unpin Store from taskbar"
    $UnpinCommand = Get-TaskVerb 5387
    ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | Where-Object{$_.Name -eq $finalname}).Verbs() | Where-Object{$_.Name -match "$UnpinCommand"} | ForEach-Object{$_.DoIt(); $exec = $true}
}
Code language: PowerShell (powershell)

Important: This script runs only once, which is a great option if you want to give the user the ability to add the icon if they want to.

Proactive Remediations

This advanced method offers continuous monitoring and remediation, ideal for larger deployments. It leverages the PowerShell script for automatic unpinning.

Steps:

1. Detection Script:

function Get-TaskVerb { 
    param([int]$verbId) 
    try { 
        $t = [type]"CosmosKey.Util.MuiHelper" 
    } catch { 
        $def = [Text.StringBuilder]"" 
        [void]$def.AppendLine('[DllImport("user32.dll")]') 
        [void]$def.AppendLine('public static extern int LoadString(IntPtr h,uint id, System.Text.StringBuilder sb,int maxBuffer);') 
        [void]$def.AppendLine('[DllImport("kernel32.dll")]') 
        [void]$def.AppendLine('public static extern IntPtr LoadLibrary(string s);') 
        add-type -MemberDefinition $def.ToString() -name MuiHelper -namespace CosmosKey.Util             
    } 
    if($global:CosmosKey_Utils_MuiHelper_Shell32 -eq $null){         
        $global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary("shell32.dll") 
    } 
    $maxVerbLength=255 
    $verbBuilder = new-object Text.StringBuilder "",$maxVerbLength 
    [void][CosmosKey.Util.MuiHelper]::LoadString($CosmosKey_Utils_MuiHelper_Shell32,$verbId,$verbBuilder,$maxVerbLength) 
    return $verbBuilder.ToString() 
} 

$apps = ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items())
foreach ($app in $apps){
    $appname = $app.Name
    if ($appname -like "*store*"){
        $finalname = $app.Name
    }
}

if($finalname){
    Write-Host "Store is pinned to the Taskbar!"
    exit 1
}
else {
    Write-Host "Store not pinned. "
    exit 0
}
Code language: PowerShell (powershell)

2. Remediation Script:

function Get-TaskVerb { 
    param([int]$verbId) 
    try { 
        $t = [type]"CosmosKey.Util.MuiHelper" 
    } catch { 
        $def = [Text.StringBuilder]"" 
        [void]$def.AppendLine('[DllImport("user32.dll")]') 
        [void]$def.AppendLine('public static extern int LoadString(IntPtr h,uint id, System.Text.StringBuilder sb,int maxBuffer);') 
        [void]$def.AppendLine('[DllImport("kernel32.dll")]') 
        [void]$def.AppendLine('public static extern IntPtr LoadLibrary(string s);') 
        add-type -MemberDefinition $def.ToString() -name MuiHelper -namespace CosmosKey.Util             
    } 
    if($global:CosmosKey_Utils_MuiHelper_Shell32 -eq $null){         
        $global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary("shell32.dll") 
    } 
    $maxVerbLength=255 
    $verbBuilder = new-object Text.StringBuilder "",$maxVerbLength 
    [void][CosmosKey.Util.MuiHelper]::LoadString($CosmosKey_Utils_MuiHelper_Shell32,$verbId,$verbBuilder,$maxVerbLength) 
    return $verbBuilder.ToString() 
} 

$apps = ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items())
foreach ($app in $apps){
    $appname = $app.Name
    if ($appname -like "*store*"){
        $finalname = $app.Name
    }
}

if($finalname){
    Write-Log "Unpin Store from taskbar"
    $UnpinCommand = Get-TaskVerb 5387
    ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | Where-Object{$_.Name -eq $finalname}).Verbs() | Where-Object{$_.Name -match "$UnpinCommand"} | ForEach-Object{$_.DoIt(); $exec = $true}
}Code language: PowerShell (powershell)

Settings Catalog - The way we always wanted it to be 🎉

This method offers a convenient and user-friendly way to manage the Store icon directly through the Intune settings catalog.

Here's what to do:

  1. Go to the Intune portal and navigate to Devices > Windows.
  2. Select Configuration profiles and click Create profile.
  3. Choose Settings Catalog.
  4. Provide a name and description for your profile.
  5. Add a setting and search for "Do not allow pinning Store app to the Taskbar (User)".
  6. Enable the setting and choose whether to apply it to all users or specific user groups.
  7. Click Next to review and then Create to deploy the profile.
Intune Settings Catalog: Prevent pinning the Microsoft Store to the taskbar

I think we can agree that this is the best and easiest way.
Another bus here is that the user even can't add the shortcut to the Taskbar anyomore, the optoin will be gone:

Store not able to pin to Taskbar


Conclusion

By strategically hiding the Microsoft Store icon from your Intune-managed devices, you create a more controlled work environment. This not only discourages unauthorized app installations but also promotes a consistent user experience and frees up valuable taskbar space. The Intune Settings Catalog method offers a user-friendly approach to remove the Microsoft Store from the taskbar, while alternative options cater to more technical users. Remember to choose the method that best suits your needs and technical expertise. With the right approach, you can effectively banish the Store icon and empower your users with streamlined, secure devices.