Powershell script to uninstall a start menu shortcut

I want to remove an app (shortcut - For ex: LogMein Client) from start menu. How can I accomplish this and can I run this from Group Policy?

I did see this script, but I did not know where to define this particular appname? It is just a single app, the below script looks like it removes several apps from start menu? Is that right? I want to be specific in how I could specify to remove just the .lnk file from startmenu for this app.

Thank you in advance

This little snippet removes uninstall icons from the start menu - improving your search results

Get-ChildItem “C:\ProgramData\Microsoft\Windows\Start Menu\Programs” -Recurse -Filter uninstall.lnk |
ForEach-Object {
Remove-Item $_.FullName
}

You may run it once, or schedule a task for this (with an action like this:

powershell.exe -file “this file’s location” -WindowStyle Hidden -NoProfile

)

or use it however you want to.

Note that this also removes 3rd party program icons from the startmenu that have the word ‘uninstall’ in their names

but since I don’t use any 3rd party uninstallers this is not a problem for me -

feel free to post an improved version in the comments and I’ll post a revision.

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org <---- Click :point_up_2:t4: :wink:

Removing the uninstall shortcuts from the start menu does not uninstall any app. :point_up_2:t4:

Of course but that is not a PowerShell question.

https://www.google.com/search?q=running+scripts+by+GPO

Why don’t you ask the author for help in the first place? He’s probably most qualified to help you with the code.

What have you tried so far? Don’t you think the -Filter parameter would be a good candidate for experiments? :wink: