Recently I needed a script to add pinned items to the task bar. I found a script at TechNet Script Center Gallery to do such a thing.
- Save your script as PinnedApplication.psm1 (IE: c:\temp\PinnedApplication.psm1)
- Open Power Shell, and import the module. (PS C:\> Import-Module C:\temp\PinnedApplication.psm1)
- To get help on syntax, execute command:
PS C:\> Get-Command PinnedApplication
- To get examples of the syntax’s to pin and unpin items from the taskbar execute the following command:
PS C:\> Get-Help Set-Pinned Application
Examples
PS C:\> Set-PinnedApplication -Action PinToTaskbar -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe"
PS C:\> Set-PinnedApplication -Action UnPinFromTaskbar -FilePath "C:\Program Files\Windows Media Player\wmplayer.exe"