How to Automatically Extract Icon Files from the Start Menu

0 Shares

Recently I was tasked to create FSLogix App Masking Rules and I wanted to do this automatically. Browsing the web I found a handy PowerShell function that extract the executable path from all Start Menu icons.

With all these path’s in an exported CSV file it’s very easy to run a ForEach loop to create FSLogix App Masking Rules. Unfortunately the cmdlets need some additional work to make that happen!

Anyhow the CSV file came handy the next day when I was creating Citrix Workspace Environment Application shortcuts in the Cloud and guess what? You need to manually upload the .ico files. What a PITA!

So how do you do that? Well you can use the awesome free Master Packager to save the .ico file from an MSI package, but what about .exe and .dll? And how can we automate all this?

Guess what, there’s a fancy Module in the PowerShell Gallery you can use. I’am setting ErrorActionPreference to get rid of all the error messages because many links points to files like .txt which doesn’t contain an icon.

0 Shares

Leave a reply