Unpin icons from Taskbar in Windows 10 20H2

Pavel yannara Mirochnitchenko 11,711 Reputation points
2020-12-30T18:59:52.337+00:00

Is there any reliable Powershell script to do this trick today? I managed these icons together with Start menu layout xml but since from 20H2 is has no effect anymore. I need to get rid of MS Store icon from Taskbar. I tried these scripts, they do process "Microsoft Store" but it not actually removed, so basically that script does not do anything.

Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,901 questions
Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,244 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,321 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Sysarrow 31 Reputation points
    2022-08-26T09:14:47.417+00:00

    Hi, I solved with this .BAT

    DEL /F /S /Q /A "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\skype empresarial.lnk"

    REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband\ /v FavoritesRemovedChanges /f

    taskkill /f /im explorer.exe

    start explorer.exe

    :)

    2 people found this answer helpful.

  2. Crystal-MSFT 42,801 Reputation points Microsoft Vendor
    2020-12-31T02:37:25.727+00:00

    @Pavel yannara Mirochnitchenko , Based on my test, I find in my environment, custom taskbar layout is working well. The "Microsoft Store" is not there when it is not included in the xml.
    52335-image.png
    52413-image.png
    For our situation, I suggest to select one Windows 10 20H2 device, customize the taskbar, export the XML and choose the information between </StartLayoutCollection> and </LayoutModificationTemplate>. we can refer it to the one in the above picture. And then deploy it via the device restriction policy.

    For the detailed steps, here is an article for the reference:
    https://hmaslowski.com/home/f/customize-windows-10-start-menu-taskbar-with-mdmuem
    Note: Non-Microsoft link, just for the reference.

    For the Powershell script, I have done a lot of research and test. And find the following Powershell script can be used to unpin Microsoft store from taskbar

    $appname = "Microsoft Store"
    ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$.Name -eq $appname}).Verbs() | ?{$.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true}

    Please try this and if there's any update, feel free to let us know.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  3. Rahul Jindal [MVP] 9,141 Reputation points MVP
    2021-01-02T00:03:58.3+00:00

    I have found that capturing the xml and deploying using device restriction policy is the best way to do it. If you understand the syntax well then you can make modifications in the xml directly. No need to capture every time.


  4. Rajendiran Subramaniyan 1 Reputation point
    2021-10-28T18:16:00.71+00:00

    Hi Crystal, The script you shared worked well, Thanks for sharing it. I tried different method to unpin internet explorer from taskbar, it may be useful for someone who looking for it.

    Create internet explorer shortcut in desktop

    $iepath = "$Home\onedrive\Windows 10 profile data\Desktop"
    $WshShell = New-Object -comObject WScript.Shell
    $Shortcut = $WshShell.CreateShortcut("$iepath\Internet Explorer.lnk")
    $Shortcut.TargetPath = "C:\Program Files\Internet Explorer\iexplore.exe"
    $Shortcut.Save()

    Unpin internet explorer

    (New-Object -ComObject shell.application).Namespace($iepath).parsename('Internet Explorer.lnk').verbs() | ?{$.Name.replace('&','') -match 'Unpin from taskbar'} | %{$._DoIt(); $exec = $true}

    Delete internet explorer shortcut from desktop

    Remove-Item -Path "$iepath\Internet Explorer.lnk" -Force


  5. Harrison, Rodney Dean 1 Reputation point
    2022-11-07T19:39:45.037+00:00

    Great script to unpin from taskbar, but I need to unpin from start menu as well, but I cannot modify your script to do that. Give me "Access Denied" and it looks like it is not renaming 'un&pin' to 'unpin'.

    This is my edited version (which does show an 'un&pin from start'):

    ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() |
    ?{$.Name -eq $appname}).Verbs() | ?{$.Name.replace('&','') -match 'Unpin from Start'} | %{$_.DoIt(); $exec = $true}

    I am confused why this is not working. Any suggestions are appreciated.

    0 comments No comments