Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using windows server 2008 R2 and it wont allow me to pin powershell scripts to the taskbar. Anyone know why and how I can pin powershell

share|improve this question
add comment

closed as off topic by voretaq7 Nov 16 '12 at 4:27

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

My previous answer was wrong so I obliterated it. One cannot pin files to the taskbar. One can only pin applications to the taskbar. Files can be pinned to the "Jump List" that is associated with an application.

For example, a .txt file can't be pinned to the taskbar, but you can pin the .txt file to the jump list of Notepad.exe or WinWord.exe.

With that in mind, to pin a .ps1 file to the Taskbar, you'll need to either pin the PowerShell ISE to the taskbar and then pin the .ps1 file to the ISE, or you'll need to make a shortcut, change the target to powershell.exe and then pass your .ps1 file as an argument. That way the shortcut appears to be to an application (which it is) but it is specifically passing your script as an argument.

Other things to keep in mind is that there are restrictions based on the filename as well. Default restrictions on words in file names include:

  • Documentation
  • Help
  • Install
  • More Info
  • Readme
  • Read me
  • Read First
  • Setup
  • Support
  • What's New
  • Remove

Those word restrictions can be found at the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames

Also, there are apparently files that cannot be pinned:

  • Applaunch.exe
  • Control.exe
  • Dfsvc.exe
  • Dllhost.exe
  • Guestmodemsg.exe
  • Hh.exe
  • Install.exe
  • Isuninst.exe
  • Lnkstub.exe
  • Mmc.exe
  • Mshta.exe
  • Msiexec.exe
  • Msoobe.exe
  • Rundll32.exe
  • Setup.exe
  • St5unst.exe
  • Unwise.exe
  • Unwise32.exe
  • Werfault.exe
  • Winhlp32.exe
  • Wlrmdr.exe
  • Wuapp.exe

The above file restrictions are found at the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation

In the end, your PowerShell file may be blocked from being pinned because there is a poison word in it.

Other References for this post are as follows:

share|improve this answer
    
Thanks for your answer. However, when I follow your instructions, i only get "Pin to Start Menu" as an option. For other file types, I have "Pin to Start Menu" AND "Pin to Taskbar" as options. –  burnt1ce85 Aug 16 '11 at 18:19
add comment

My preferred method is to create a shortcut on the desktop first and pin the shortcut to my task bar. I've also used WesleyDavid's a couple times but I don't like having to pull it from the start menu to the task bar.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.