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.

 
 
 
 
 
(24)
Add to favorites
8/5/2010
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Script Change for $global:CosmosKey_Utils_MuiHelper_Shell32
    1 Posts | Last post July 15, 2016
    • I believe this:
      
        if($global:CosmosKey_Utils_MuiHelper_Shell32 -eq $null){         
                  $global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary("shell32.dll")
      
      Should be changed to prevent false warnings to this:
      
        if(!(test-path variable:global:CosmosKey_Utils_MuiHelper_Shell32)){
                          $global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary("shell32.dll") 
      
  • thanks
    1 Posts | Last post December 22, 2015
    • worked for me, I wrote up a quick ditty how I did it in Windows 7 for pinned stuff:
      
      http://vivithemage.com/2015/12/22/running-a-powershell-command-via-batch-or-command-that-is-restricted/
  • Error checking?
    1 Posts | Last post December 02, 2015
    • I am trying to use this in an environment where we are migrating from office 2010 to 2013 and to Notes 9 on windows 7. I would like to have it simply unpin Notes and the Pin Notes and word, excel and Powerpoint. If any of these already exist and I try to pin them the script/module errors and exits, if they dont exist and I try to unpin them it does the same with the verb not found error.
      Has anyone managed to get some form of error checking going in this? or managed to get it to check if a application is already pinned to skip and carry on instead of erroring out?
  • Trying to run on Windows 8.1
    2 Posts | Last post October 06, 2015
    • 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
      (E_INVALIDARG))”
      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 October 06, 2015
    • 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
      (E_INVALIDARG))»
      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:
      https://connect.microsoft.com/PowerShell/feedback/details/1609288/pin-to-taskbar-no-longer-working-in-windows-10
  • 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
      Jone
  • 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. 
      
      [Parameter(Mandatory=$true)][ValidateSet("PintoStartMenu","UnpinfromStartMenu","PintoTaskbar","UnpinfromTaskbar")][string]$Action
      
      Hope this helps!
      Thanks,
      Ben
1 - 10 of 26 Items