none
Remove Edge from Taskbar using PowerShell

    Question

  • I am using a PowerShell script to add and remove icons to taskbar - users can run it. Basically it uses the PS verbs to pin or unpin. Works fine but I can't get rid of Edge.

    $shell = New-Object -ComObject Shell.Application 

    #Unpin Microsoft Edge
    $folder = $shell.NameSpace((Join-Path ${env:Windir} 'SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe'))
    $item = $folder.parsename('MicrosoftEdge.exe')
    $verb = $item.Verbs() | ? {$_.Name -eq 'Unpin from tas&kbar'}
    if ($verb) {$verb.DoIt()}

    Looking at articles it states the file location of Microsoftedge.exe to be as above but if you run the script above manually there is no verb to unpin so I'm pretty sure the icon is NOT from that exe. Moreover that icon has a white background. By hand you can do an unpin from Taskbar so where is this icon located ???. I realise the icons are created with the profile, but that's the whole point of running it as the user so they can pin/unpin as needed via the script


    Ian Burnell, London (UK)

    Friday, July 15, 2016 8:32 AM

Answers

All replies

  • Hello,

    look at THIS blog post (credits to the author).

    Look also at these posts: https://connect.microsoft.com/PowerShell/feedback/details/1609288/pin-to-taskbar-no-longer-working-in-windows-10

    Please, let us know

    Friday, July 15, 2016 9:04 AM
  • As Victor Ochs mentioned, please try it.


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Monday, July 18, 2016 9:38 AM
    Moderator
  • That seems incredibly complicated. I haven't tested this script because it needs to be formatted. What I have done is to take Jorgen Nilsson's script http://ccmexec.com/2015/12/removing-the-edge-icon-from-the-taskbar-during-osd/ to create a blank taskband registry key  and then hybrid it with the above PowerShell script to add on the icons to the now blank taskbar such as Office and Internet Explorer. It works ok, but given the fact that you can right click the Edge icon on the taskbar and chose to unpin I still can't see why there isn't a simple unpin command for it in PS


    Ian Burnell, London (UK)

    Wednesday, July 20, 2016 7:28 AM