This project has moved. For the latest updates, please go here.

Pin SharePoint admin tools to the taskbar

Topics: Feature Requests
Mar 20, 2014 at 11:05 AM
The following script will pin SharePoint powershell & Central Admin, SQL Management Studio and Event Viewer, and unpin vanilla powershell.
$shell = new-object -com "Shell.Application"  

#Pin SharePoint
#Namespace 23 = C:\ProgramData\Microsoft\Windows\Start Menu\Programs
$sp=$shell.NameSpace(23).ParseName("Microsoft SharePoint 2013 Products")
if ($sp -eq $null)
    $sp=$shell.NameSpace(23).ParseName("Microsoft SharePoint 2010 Products")
if ($sp -ne $null)
    $sp.GetFolder.ParseName("SharePoint 2013 Management Shell.lnk").InvokeVerb('taskbarpin')
    $sp.GetFolder.ParseName("SharePoint 2013 Central Administration.lnk").InvokeVerb('taskbarpin')

#Pin SQL if present
$sql = $shell.NameSpace(23).ParseName("Microsoft SQL Server 2012")
if ($sql -eq $null)
    $sql = $shell.NameSpace(23).ParseName("Microsoft SQL Server 2008R2")
if ($sql -eq $null)
    $sql = $shell.NameSpace(23).ParseName("Microsoft SQL Server 2014")
if ($sql -ne $null)
    $sql.GetFolder.ParseName("SQL Server Management Studio.lnk").InvokeVerb('taskbarpin')

#Pin IIS
#Namespace 37 = C:\Windows\System32

#Unpin vanilla powershell

#Event viewer
$shell.NameSpace(23).ParseName("Administrative Tools").GetFolder.ParseName("Event Viewer.lnk").InvokeVerb('taskbarpin')

Mar 20, 2014 at 12:45 PM
I never thought about doing this!
Mar 26, 2014 at 12:40 AM
Actually there is a bug in that code for SharePoint 2010 - it is using '2013' in the names of the links to pin.