Script to remove invalid shortcuts from start menu

Last week I was asked to write a script that could be executed on desktops in the user context as part of a pre-migration script.
The goal of the script was to check for, and remove, invalid shortcuts from the Start Menu / Start Screen.
Luckily I did this once or twice before, so I dove in my repository and shared it.
So, here is the script… Hope you find it useful 🙂

4 comments

  1. Travis says:

    I’d recommend adding a -recurse switch on your get-childitem cmd otherwise you’ll be getting a short list 🙂

  2. Nich says:

    So what does this script achieve ?

  3. Jeff Wouters says:

    I thought the title of the post was pretty self-explanatory?

  4. Khalid says:

    Replace $LnkFilePath with $FilePath then the script works. Also agree with Travis.

Leave a Reply

Your email address will not be published. Required fields are marked *