none
How can I unpin a program from Start and Task Menu with GPO ir Script? RRS feed

  • Question

  • Morning all,

    We need to have chrome installed and used by some users but not all.  So, i would like a GPO that unpins Chrome from the start menu and task bar for specific groups.

    It needs to be a GPO or logon script as the users use citrix.

    Thanks


    Martin

    Monday, November 26, 2012 8:16 AM

Answers

  • Hi Martin,
    Here some example code to unpin from task bar or start menu.
    Sadly you have to use the com object:

    $shell = new-object -com "Shell.Application"  
    $folder = $shell.Namespace('C:\Program files (x86)\Notepad++')    
    $item = $folder.Parsename('notepad++.exe')
    $verb = $item.Verbs() | ? {$_.Name -eq 'Unpin to Tas&kbar'}
    if ($verb) {$verb.DoIt()}
    
    $shell = new-object -com "Shell.Application"  
    $folder = $shell.Namespace('C:\Program files (x86)\Notepad++')    
    $item = $folder.Parsename('notepad++.exe')
    $verb = $item.Verbs() | ? {$_.Name -eq 'Unpin from Start Men&u'}
    if ($verb) {$verb.DoIt()}

    But be carefull the verbs are diverent for each language version.
    You can get the verbs you need by running $item.Verbs()

    Regards
    Dan


    Monday, November 26, 2012 11:43 AM