Windows 10: Pin Apps to the Taskbar Using Group Policy
In this Ask the Admin, I will show you how to pin apps to the taskbar using Group Policy in Windows 10 Anniversary Update.
Read the Best Personal and Business Tech without Ads
Staying updated on what is happening in the technology sector is important to your career and your personal life but ads can make reading news, distracting. With Thurrott Premium, you can enjoy the best coverage in tech without the annoying ads.
Back in 2014, I showed you how to Customize the Start Menu in Windows 10 using the Export-StartLayout PowerShell cmdlet on the Petri IT Knowledgebase. Last summer’s Anniversary Update expanded the Group Policy settings and provided a supported way of customizing the taskbar.
Create a Layout File
To customize the taskbar, we will need to manually create an XML file. If you want to customize both the taskbar and Start menu, you can add code to an XML file generated by Export-StartLayout. The code below pins Paint, IE, and Outlook Calendar to the taskbar. By adding PinListPlacement=”Replace” to <CustomTaskbarLayoutCollection>, the default pinned apps are replaced by those specified in the file.
<?xml version="1.0" encoding="utf-8"?> <LayoutModificationTemplate xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1"> <CustomTaskbarLayoutCollection PinListPlacement="Replace"> <defaultlayout:TaskbarLayout> <taskbar:TaskbarPinList> <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk"/> <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" /> <taskbar:UWA AppUserModelID=" microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar" /> </taskbar:TaskbarPinList> </defaultlayout:TaskbarLayout> </CustomTaskbarLayoutCollection> </LayoutModificationTemplate>
Finding the AppUserModelID for UWP Apps
UWP apps are identified in an XML file using the AppUserModelID and win32 desktop apps are identified by the executable path. Unfortunately, the only way to get the AppUserModelID for each UWP app is to export an existing Start menu layout. This is done by using the Export-StartLayout cmdlet. You will open the resulting XML file and search for the AppUserModelID manually. The .PackageFamilyName parameter returned by the Get-AppXPackage cmdlet is similar to AppUserModelID but it is not the same.
Make sure that any apps you want to get the AppUserModelID for, are pinned to the Start menu. Open a PowerShell prompt and run the Export-StartLayout cmdlet as shown below. The temp folder must already exist.
Open start.xml using Notepad. Locate the apps and the individual AppUserModelIDs.
Create a Group Policy Object
Now that we have a working layout file, all that remains is to create a Group Policy Object (GPO). This is needed to apply the configuration to devices in our Active Directory domain. For more information on working with Group Policy, see Working with Group Policy on Petri.
- In the Group Policy Object Editor, expand User Configuration and Administrative Templates. Click Start Menu and Taskbar.
- In the center pane, double-click Start Menu Layout.
- In the Start Screen Layout dialogue box, click Enabled.
- In the Start Layout File box, type the path to the .xml configuration file you previously created using Export-StartLayout.
- Click OK.
After Group Policy is refreshed on devices that fall within the scope of the new GPO, users will need to log out. They will need to log back in again before seeing changes to the taskbar. A Group Policy refresh can be forced using the gpudpate command.
In this article, I showed you how to customize the taskbar in Windows 10 Anniversary Update using Group Policy.