Remove Edge from Taskbar

I have a cmdlet to pin icons to task bar. It all works fine apart from unpinning MS edge

#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()}

If I run it by hand the $verb has a pin to taskbar but not unpin from taskbar
Googling shows that the file location is \systemapps… as above but I’m wondering if its correct location or not
(I can manually see an unpin from taskbar if I right click but would like to do it from PS

Looking in $item.Verbs() I can only see a &Pin to Start option

There is nothing to unpin from start or task bar.

This has been checked on a Windows 10 machine that was only upgraded last night and on the latest Insider preview build

Which version of Windows 10 and PowerShell are you using?