Removing Start Menu shortcut for a single program Windows 10

JKFrancis 81 Reputation points
2022-09-02T14:08:25.75+00:00

I would like to know how we could remove a single start menu shortcut for ex: excel or adobe using Powershell script for all users.

I want to deploy this through Group Policy or configuration policy using Azure. How can I do it?

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JimmySalian-2011 42,491 Reputation points
    2022-09-02T14:17:40.613+00:00

    Hi,

    Did you check Group Policy Preferences > It should help in removing items

    group-policy-shortcut-extensions-ie11

    ==
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

  2. Limitless Technology 39,921 Reputation points
    2022-09-09T08:16:00.423+00:00

    Hello there,

    I found the below script which helps in removing invalid shortcuts for users.

    Function Remove-InvalidStartMenuItem {
    $WshShell = New-Object -comObject WScript.Shell
    $Files = Get-ChildItem -Path "C:\Users\$env:USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" -Filter *.lnk -Recurse
    foreach ($File in $Files) {
    $FilePath = $File.FullName
    $Shortcut = $WshShell.CreateShortcut($FilePath)
    $Target = $Shortcut.TargetPath
    if (Test-Path -Path $Target) {
    Write-Output "Valid: $($File.BaseName)"
    } else {
    Write-Output "Invalid: $($File.BaseName) removed."
    try {
    Remove-Item -Path $FilePath
    Write-Output "Removed: $($File.BaseName) removed."
    } catch {
    Write-Output "ERROR: $($File.BaseName) not removed."
    }
    }
    }
    }

    The below thread discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.

    https://social.technet.microsoft.com/Forums/windowsserver/en-US/12028406-63c9-47c0-9080-bbfd50352eed/removing-shortcuts-from-desktop-amp-start-menu-using-gpo?forum=winserverGP

    https://social.technet.microsoft.com/Forums/en-US/f28d1e03-d059-4c74-b328-155ff33901f4/how-do-i-delete-shortcuts-on-my-deskptop-using-powershell-scripting?forum=ITCG


    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.