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

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

LVL 63
McKnifeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

McKnifeAuthor Commented:
Just minutes ago, I found the solution:
function UnPin-App([string]$appname){
    try{
        ((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()}
    }catch{}
}
unpin "Store"

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
McKnifeAuthor Commented:
self-solved
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.