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
closed as off topic by voretaq7♦ Nov 16 '12 at 4:27
Questions on Server Fault are expected to relate to 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.
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:
Those word restrictions can be found at the following registry key:
Also, there are apparently files that cannot be pinned:
The above file restrictions are found at the following registry key:
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:
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.