Pin and unpin applications from the taskbar and Start-menu

PowerShell-module with the ability to pin and unpin programs from the taskbar and the Start-menu in Windows 7 and Windows Server 2008 R2.

Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Trying to run on Windows 8.1
    2 Posts | Last post 3:23 PM
    • Wow this is a great script! I would really like to use it on Windows 8. But each time I do I get the following error:
      PS C:\> Set-PinnedApplication -Action UnPinFromStartMenu -FilePath “C:\WINDOWS\system32\notepad.exe”
      Exception calling “DoIt” with “0″ argument(s): “The parameter is incorrect. (Exception from HRESULT: 0×80070057
      At C:\PinnedApplication.psm1:67 char:13
      + $itemVerb.DoIt()
      + ~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : ComMethodTargetInvocation
      This happens whether I’m calling the UnPinFromStartMenu OR PinToStartMenu actions…
      Anybody have any ideas how to get it to run on Windows 8?
    • I've got the same error message on Windows Server 2012 R2. 
      Do you get a solution since you posted this message ?
  • Exception on Windows Server 2012 R2
    1 Posts | Last post 3:19 PM
    • Hello !
      I'm getting errors.
      PS C:\> Set-PinnedApplication -Action PinToStartMenu -FilePath "C:\Windows\System32\notepad.exe"
      Exception lors de l'appel de «DoIt» avec «0» argument(s): «Paramètre incorrect. (Exception de HRESULT : 0x80070057
      Au caractère C:\temp\PinnedApplications.psm1:67 : 13
      +             $itemVerb.DoIt()
      +             ~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ComMethodTargetInvocation
      The script is executed on a Windows Server 2012 R2. 
  • Is there a win10 version of this?
    2 Posts | Last post August 28, 2015
    • I'm getting errors.
      Get-Command -Module PinnedApplications
      CommandType     Name                                               Version    Source
      -----------     ----                                               -------    ------
      Function        Set-PinnedApplication                              0.0        PinnedApplications
      PS C:\Users\administrator> Set-PinnedApplication -Action PinToTaskbar -FilePath C:\Windows\system32\notepad.exe
      Verb Pin to taskbar not found.
      At \\insight-dc3\netlogon\ps1\PinnedApplications.psm1:65 char:13
      +             throw "Verb $verb not found."
      +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (Verb Pin to taskbar not found.:String) [], RuntimeException
          + FullyQualifiedErrorId : Verb Pin to taskbar not found.
    • There are some issues making it work in Windows 10, details here:
  • verb not found
    1 Posts | Last post August 26, 2015
    • I keep getting the "verb not found error" and the suggestions listed did not help. It only seems to happen with .lnk files for me and not .exe files. Alternatively, if I could pin an exe with an argument after the target file that would work.
  • Hold Shift to Pin
    1 Posts | Last post August 03, 2015
    • I have a couple programs that i can pin by holding shift and right clicking the icon to pin to start menu. I was able to get your script to work for all applications except for those. How can I get the script working for icons that require you to hold shift to pin when using the mouse?
  • Unable to pin file explorer
    1 Posts | Last post January 15, 2015
    • Hi, Amazing script. 
      Having some problems when i want to add the file explorer link.
      Set-PinnedApplication -Action PinToTaskbar -FilePath "\\npcloud\tsasp\HorizonStartMenuASP\Programs\File Explorer.lnk" 
      I am getting an error on line 65, char 13 on the orignal script. 
      Error: Verb Pin to Taskbar not found.
      At line:65 char:13
      +             throw "Verb $verb not found."
      +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (Verb Pin to Taskbar not found.:String) [], RuntimeException
          + FullyQualifiedErrorId : Verb Pin to Taskbar not found.
      Thanks for help
  • Request for Small Change
    1 Posts | Last post September 18, 2014
    • Jan,
      Amazing script! I really like. I find myself forgetting which actions are available so I made a small modification to 1 line to ensure greater success. 
      Hope this helps!
  • How to pin(Upin) EXE file to Metro UI on Win8?
    2 Posts | Last post May 29, 2014
    • Hello,
      The scripts can work on Win7.But I want to use it on Win8.On Win8 Pin to taskbar can work correctly,but pin to start menu has error.
      By the way,On Win8,how can i pin(Upin) a EXE file on start screen(Metro) UI?
      Any suggestions?
      Best Regards
    • Hello All
      Can some one check this script and tell me why it is not working on Windows 7. I used a Windows 8 PC to do the script and test it and it work properly. The script basically unpin the Mozilla Firefox from task bar for all users. 
      Sub ShowFolderList(folderspec)
          on error resume next
      	Dim fs, f, f1, fc, s
      	Set objShell = CreateObject("Shell.Application") 
              Set objFSO = CreateObject("Scripting.FileSystemObject")
      	Set fs = CreateObject("Scripting.FileSystemObject")
      	Set f = fs.GetFolder(folderspec)
      	Set fc = f.SubFolders
      	For Each f1 in fc
             REM wscript.echo "Here is all the sub folders : " & 
      		strFileName = objFSO.GetFileName(f1)
             REM wscript.echo "value of strFileName is : = " & strFileName
      		Set objFolder = objShell.Namespace("C:\Users\" & strFileName & "\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar")
      Set objFolderItem = objFolder.ParseName("Mozilla Firefox.lnk") 
      Set colVerbs = objFolderItem.Verbs
      For Each objVerb in colVerbs 
         If Replace(, "&", "") = "Unpin from Taskbar" Then 
         REM wscript.echo " Unpin successfully for user : = " & strFileName
         REM wscript.echo " There is nothing to Unpin for user : = " & strFileName
         end if 
      End Sub
      showfolderlist "C:\Users"
  • I can't get it to work in a logon script
    1 Posts | Last post November 11, 2013
    • Hi Jan,
      I've tested the PS script on a W7 64 bit workstation and it works like a charm.
      But now I'm trying to get this script to work by using a GPO with a logon script calling this module. And I cannot get it to work.
      I am using a Windows Server 2008R2 domain controller and a W7 64 bit workstation for the test.
      This is what I have done:
      1. I have put the PinnedApplications.psm1 file on the domain controller
      2. I use the powershell tab for the logon script and filled it with the following parameters:
      Script name: PinnedApplications.psm1
      Script parameters: Set-PinnedApplication -Action PinToStartMenu -FilePath "C:\WINDOWS\system32\notepad.exe"
      What am I doing wrong?
      Best regards,
  • Verb missing Windows Server 2012 R2
    1 Posts | Last post November 01, 2013
    • I also can not access the verbs via powershell. It is available via the gui but not via code. Does anyone have a work around
      Run as &administrator
      Pin to Tas&kbar
      Restore previous &versions
      Create &shortcut
1 - 10 of 23 Items