Script needed that unpins certain built-in apps from the start menu

McKnife used Ask the Experts™
Hi experts.

I am migrating our company desktops from win8.1 to win10.
Automated start menu migration is what this is about.

Win10 adds a dozen shortcuts to apps which I have unpinned automatically simply by uninstalling that apps. There's one app however, that I don't want to uninstall, but still I want to have it removed from the start menu by a script.

I can unpin any item that I know the executable-path of, I use (code example for the classic app journal.exe)
(New-Object -Com Shell.Application).NameSpace(0x0).ParseName('C:\Program Files\Windows Journal\Journal.exe').Verbs() | ?{$_.Name.replace('&','') -match 'unpin from start'} | %{$_.DoIt()}

Open in new window

But what would be the path of for example the windows store app and would it work in a similar way as with the classic apps? If not, how to?
I tried this code to no avail:
(New-Object -Com Shell.Application).NameSpace(0x0).ParseName('C:\Program Files\WindowsApps\Microsoft.WindowsStore_2015.7.1.0_x64__8wekyb3d8bbwe\WinStore.Mobile.exe').Verbs() | ?{$_.Name.replace('&','') -match 'unpin from start'} | %{$_.DoIt()}

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018
Just minutes ago, I found the solution:
function UnPin-App([string]$appname){
        ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Von "Start" lösen|Unpin from Start'} | %{$_.DoIt()}
unpin "Store"

Open in new window

Distinguished Expert 2018



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial