- Poll: How reliable are ChatGPT and Bing Chat? - Tue, May 23 2023
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
First, copy and paste the PowerShell module to an editor on your computer. I suggest you save the file to one of your PowerShell module folders. With $env:PSModulePath, you can get a list of your module paths.
PS C:\> $env:PSModulePath C:\Users\administrator\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
In this example, we use C:\Users\Administrator\Documents\WindowsPowerShell\Modules. You have to create a folder with the name PinnedApplications in the module folder and then save the file as PinnedApplications.psm1 to this folder. This would be the file path:
C:\Users\Administrator\Documents\WindowsPowerShell\Modules\PinnedApplications\PinnedApplications.psm1
Make sure your execution policy is set to unrestricted (Set-ExecutionPolicy Unrestricted). Next, you can import the module with the Import-Module cmdlet.
PS C:\> Import-Module PinnedApplications PS C:\>
If no error message appears, you are fine. Use the Get-Command cmdlet to check what commands the module contains.
PS C:\> Get-Command -Module PinnedApplications CommandType Name ModuleName ----------- ---- ---------- Function Set-PinnedApplication PinnedApplications
From now on, you can use Set-PinnedApplication to pin and unpin apps to the Windows Taskbar.
With Get-Help Set-PinnedApplication, you get an overview of the cmdlet.
Get-Help Set-PinnedApplication
The synopsis indicates that the cmdlet was made for Windows 7 and Windows 2008 R2. I tried the module with Windows 8.1, and it appears to work fine for pinning and unpinning apps to the Taskbar. However, in my tests, the actions PinToStartMenu and UnPinFromStartMenu didn’t work on Windows 8.1 but worked well on a Windows 7 machine.
The example below demonstrates how you can pin Notepad to the Taskbar:
PS C:\> Set-PinnedApplication -Action PinToTaskbar -FilePath C:\Windows\system32\notepad.exe PS C:\>
Notepad pinned to Taskbar
Wouldn’t it be wonderful if you could unpin the Store app from the Taskbar with PowerShell? It is not easy as one might think. In my next post, I show you how you can use the Set-PinnedApplication function of Jan Egil Ring’s module in a logon script so you can unpin the Store app on all computers in your network.
Can’t wait to see the next post about removing store app from taskbar by logon script!
The article is scheduled for this week.
Hello,
Have this been tested on Win10?
Best Regards,
Simon
It doesn’t in W10. Verbs function is unknown.
Yes, the module doesn’t work in Windows 10. You now can pin apps to taskbar with Group Policy.
Hello,
Is it possible to pin folders and shortcuts to the task bar using this script? For now I’m only able ton pin .exe
Thanks
I would like to be able to pin icons to the taskbar using PowerShell within Windows 10 (instead of using group policy).
Is there any way that this can be done within Windows 10?
Can you provide a different PinnedApplications.psm1 file that will work within Windows 10?