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