Customize Pinned Items on Taskbar in Windows 10 1607 during OSD with ConfigMgr

207_3

In previous version of Windows 10, customizing the task bar has been proven difficult to not say the least. Now with the release of Windows 10 version 1607, we finally have built-in support for customizing what’s pinned on the task bar. In this blog post, I’ll show you an example of how you can pin your desired applications to the taskbar during operating system deployment with ConfigMgr.

What’s new in Windows 10 version 1607

You may have previously used the Export-StartLayout and Import-StartLayout cmdlets available in Windows 10. Traditionally, you’d manually customize your Start menu layout, run the Export-StartLayout cmdlet to generate a XML file. This XML file would then be used during deployment of Windows 10 with ConfigMgr, by invoking the Import-StartLayout cmdlet at some point during the Online phase. From Windows 10 version 1607, you have several options to apply a customized taskbar, including:

  • PowerShell
  • Group Policy
  • Mobile Device Management (MDM)
  • Provisioning Packages

As with Windows 10 version 1607 (and above), you can now leverage the Import-StartLayout cmdlet to either import a XML file containing your taskbar customizations or embedd the taskbar customizations in the XML file that you’re using for modifying the Start menu layout. Either option you select, this new functionality becomes really handy when deploying Windows 10 Enterprise or Education from now on. You can also specify different taskbar configurations based upon device locale and region, reducing the need for various XML files containing different configuration per region or locale.

In this post, we’ll focus on leveraging the PowerShell way of customizing the taskbar.

Note! The previous method of using TaskBarLinks in an unattended Windows setup file has been deprecated in Windows 10 version 1607. Use any of the new methods instead going forward with your Windows 10 deployment.

Pinned items placement in the taskbar

Depending on whether you’re applying taskbar customization to a clean install, or during a Windows 10 in-place upgrade (Feature Upgrade, e.g. going from Windows 10 version 1511 to 1607), there are a few things that you need to be aware of. First things first though. The taskbar in Windows 10 consists of three categories of pinned items:

  • Applications that are pinned by the user
  • Default Windows applications (Microsoft Edge, File Explorer and Store)
  • Applications pinned by the enterprise (through methods mentioned above)

There are a set of rules that determine how the pinned items on the taskbar appear. Default Windows application items are pinned to the left, applications pinned by the user are placed in the center and applications pinned by the enterprise (e.g. with Import-StartLayout cmdlet during operating system deployment) are placed to the right. Below is a picture borrowed from the taskbar documentation on TechNet, illustrating the placement rules.

207_1
In the scenario of operating system deployment and customizing the pinned items on the taskbar, we’re able to modify the blue circles and the green squares.

Keep in mind though, that users will still be able to:

  • Pin additional applications
  • Change the order of pinned applications
  • Unpin any application (except for those pinned by the enterprise, see more below)

This applies to clean installations of Windows 10, including in-place upgrades.

NOTE! As for applications pinned by the enterprise, these will return if unpinned by the end-user every time explorer.exe restarts or at logon. If that’s not suitable for your environment, meaning that user changes are non-persistent, I’d recommend to apply the XML files with Group Policy instead.

Sample taskbar XML file

Now that we’ve covered what’s new in Windows 10 version 1607 in terms of customizing the taskbar including how items are placed, let’s take a look at a sample XML file. For this scenario, I’m going to replace the Store (Default Windows application) with Paint and add a pinned Command Prompt.

We can accomplish that by using the following XML code:

<?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:UWA AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%appdata%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk" />
      </taskbar:TaskbarPinList>
    </defaultlayout:TaskbarLayout>
  </CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

If you want to have your taskbar customization in the same XML file as your Start menu configuration, you can do that like this:

<?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">
<LayoutOptions StartTileGroupsColumnCount="1" />
  <DefaultLayoutOverride>
    <StartLayoutCollection>
      <defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
        <start:Group Name="Items" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
          <start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar" />
          <start:Tile Size="2x2" Column="4" Row="0" AppUserModelID="microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" />
          <start:Tile Size="4x2" Column="0" Row="2" AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
          <start:Tile Size="2x2" Column="4" Row="2" AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
          <start:Tile Size="4x2" Column="2" Row="4" AppUserModelID="Microsoft.WindowsStore_8wekyb3d8bbwe!App" />
          <start:DesktopApplicationTile Size="2x2" Column="0" Row="4" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Control Panel.lnk" />
        </start:Group>
      </defaultlayout:StartLayout>
    </StartLayoutCollection>
  </DefaultLayoutOverride>
  <CustomTaskbarLayoutCollection PinListPlacement="Replace">
    <defaultlayout:TaskbarLayout>
      <taskbar:TaskbarPinList>
	    <taskbar:UWA AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" />
        <taskbar:DesktopApp DesktopApplicationLinkPath="%appdata%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk" />
      </taskbar:TaskbarPinList>
    </defaultlayout:TaskbarLayout>
  </CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

If you want to see more examples of XML code for various scenarios when customizing the taskbar, check the documentation on TechNet:

https://technet.microsoft.com/en-us/itpro/windows/manage/configure-windows-10-taskbar

Take a note though, the example Microsoft provide to embed Start menu and taskbar configuration in the same XML file doesn’t seem to work, due to the fact that the <CustomTaskbarLayoutCollection> section needs be added after </DefaulLayoutOverride> for the Import-StartLayout cmdlet to accept the XML code. From the sample code above for both the Start menu and taskbar, it only seems to apply the taskbar customization though.

Locate required properties when pinning applications

As you may have noticed from the XML sample code above, after the <taskbar:TaskbarPinList> section, I’ve added the pinned items that I want. As for the AppUserModelID property, you should use this for Universal Apps. For the DesktopApplicationLinkPath property, use this for traditional desktop applications (Win32). The easiest way to find this data for an application is to perform the following:

1. Pin the application to the Start menu.
2. Open a PowerShell console and run the Export-StartLayout cmdlet and specify a XML file
3. Open the XML file.
4. Look for an entry corresponding to the application you pinned.
5. Look for either the AppUserModelID or DesktopApplicationLinkPath property.

Customize taskbar during operating system deployment

If you’ve previously applied custom Start menu layouts during Windows 10 deployments, the process of applying the taskbar is no different really. What I normally do is that I create a Package containing the XML file (in this case it would contain the XML sample code above) together with a PowerShell script file (.ps1). The PowerShell script file contains the following code:

Import-StartLayout -LayoutPath .\TaskBar.xml -MountPath $env:SystemDrive\

In your task sequence, simply just add a Run PowerShell Script step in a suitable location, point to the package and add the PowerShell script file that should be invoked.
207_4
When you now deploy your Windows 10 version 1607 machines, you’ll get the customized taskbar experience from the XML code that you’ve created.

Results

This is how the default taskbar experience looks like in Windows 10 version 1607:
207_2
After a successful deployment of Windows 10 version 1607 with ConfigMgr, the result will be like this:
207_3
Since this has been a feature requested by many for a long time now, I’m very excited that we now have a fully supported way of customizing the taskbar experience for end users. For those of you that really needs to pin the Internet Explorer application to the taskbar, you now have a supported way of doing that. Isn’t that great?

26 Comments

  1. QWade

    Great post! Can DesktopApplicationID be used to pin apps to the taskbar with this method? The reason I ask, I have added some of the Office 2016 programs to my start menu. These pinned apps have this tag in the exported xml.

    Reply
  2. connavar

    Thanks for your post, it got me started along the right lines.

    There does seem to be an issue though, if you apply a taskbar.xml it erases your start menu customisation and it goes back to default, if you then reapply your start menu customisation it then erases the task bar config.

    I managed to get both the start menu and task bar working in one config, here’s an example: http://pastebin.com/0P5d0PmJ

    Thanks again.

    Reply
    1. Steve Whitcher

      Thanks connavar, your sample helped me identify the problem. It looks like there were a couple of problems with the ‘combined’ sample on technet — the “LayoutModificationTemplate” section didn’t have all of the necessary schema definitions included, and the “CombinedTaskbarLayoutCollection” section needs to come after the closing “DefaultLayoutOverride” tag. After changing those, my start layout xml file is imported successfully.

      Reply
    2. NickolajNickolaj (Post author)

      Thanks for sharing! I’ve updated the post with some notes from my tests as well, and a sample portion for how to get the Import-StartLayout cmdlet to accept the XML code.

      Reply
    3. Bob

      Connavar, can you post the example that was in the link again? I can’t connect to it.

      Thanks

      Reply
  3. Steve Whitcher

    I’ve just been working on this myself, and struggling with powershell telling me the layout file isn’t valid when I copied from technet. Glad to see I wasn’t alone.

    Using the example you included, I can successfully import the taskbar layout. I’ve got an existing start layout file that I can import as well. For some reason though, whenever I try to combine the two into a single layout file, I’m back to the error ‘not a valid layout file’.

    Have you had any luck with a combined layout file containing both a start layout & taskbar layout?

    Reply
    1. NickolajNickolaj (Post author)

      I’ve just updated the post with an example 🙂

      Reply
  4. jessie

    This doesn’t appear to work as I would expect. I set the following xml:

    I logged in as the user and it pinned the items as I would expect. I logged out, changed the file adding some in between the others to see if it would set the correct order. It added the new items, but to the end of the taskbar. I also tried removing one. It did not remove it from the taskbar. Why doesn’t it put them in the correct order or remove them? Will the actual order only work on the creation of a new profile?

    Reply
  5. RobG

    Thank you for your post Nickolaj! I am seeing something strange happen and I am not sure if it is something I am doing wrong or some type of bug. When I apply my StartMenu/TaskBar xml file, there seems to be a small issue with the Internet Explorer icon on the taskbar. When you click to open an internet explorer instance, a second IE icon appears on the taskbar. If you open another, it will group behind the ‘2nd IE icon’… Has anyone else seen this behavior?

    Reply
  6. skatterbrainz

    Once again – a great post, and very helpful! Thank you!

    Reply
  7. EvilBetty

    Nikolaj and connavar, I can’t get EITHER of your examples to work with “Import-StartLayout”

    “LayoutModification.xml is not a valid layout file”

    Copying to “c:\Users\AppData\Local\Microsoft\Windows\Shell”, and it gets ignored.

    Reply
  8. BranM

    This works but if I then unpin the Command prompt and Paint from the taskbar then log off and back in, the icons back, they are pinned again.

    I find this is the case with every example from Microsoft and this one.

    Do you all also experience this issues?
    Or is it just me?

    Reply
    1. RobG

      @ BranM my taskbar pins follow the same behavior as yours. I think that this is by design.

      Reply
  9. Daniel

    I am having the same problem with the icons reappearing after they are removed, logging off and back in.

    What is more annoying for me is that I can’t seem to change the order of the icons, even if one is before the other in the XML file. When pinning IE and File Explorer, the File Explorer is pinning first but I would like them the other way around.

    Does anyone have a solution for this?

    Reply
  10. RobG

    @BranM the TechNet article has been updated to explain the behavior that we are seeing. It looks like the taskbar pins can be applied in a non-persistent fashion if you apply the layout via Group Policy.

    Reply
  11. NickolajNickolaj (Post author)

    I’ve updated the article to reflect the behavior of non-persistent user changes when the task bar XML is applied with Import-StartLayout cmdlet.

    Regards,
    Nickolaj

    Reply
  12. Pingback: Windows 10 1607 – Taskbar and Start Customization Deep Dive | SCCM GURU

  13. Stefan

    Hi,

    the Import is working for me for NEW users without a Profile on the Windows Client. We are upgrading our Enterprise Clients from Version 1511 to 1607 with existing user profiles on the Client. After the upgrade we got the edge Icon back on the taskbar. Is there a way to reapply the new XML file to existing user profiles without the GPO solution?

    Reply
  14. Sach

    Hi Nicholaj,
    I have followed the process and below is my xml. The start manu items work fine but the taskbar itms do not get pinned.

    <!—->

    <!– –>

    when I used your script for the original Paint and CMD, these seem to have worked but not when I modified it to my liking.
    Can you assist?

    Reply
    1. Sach

      Hi,
      Just to update the settings that have worked for me so far in terms of setting the taskbar and start menu option. I have noticed that omitting “” line at the start of the XML and having the below as my XML has worked perfectly.

      <!—->

      Reply
  15. Sach

    Omitting the start line of “?xml version=”1.0″ encoding=”utf-8″?” from the XML file has worked.

    I realize that I am unable to paste the contents of my xml file in this section. You guys can send me your email address and i can post the exact XML contents if you like.

    Sach

    Reply
    1. Thomas

      Hello, I also have the problem when I add the section to the taskbar.
      The file is not imported.
      I try with only the taskbar section, but the problem is the same, here’s an example of my XML file.

      Reply
    2. Thomas

      Hello, I also have the problem when I add the section to the taskbar.
      The file is not imported.
      I try with only the taskbar section, but the problem is the same, here’s an example of my XML file.

      can you tell me what is wrong
      thanks in advance

      Reply
      1. Sach

        Hi Thomas,
        I cannot view your XML file.

        Can you save it as an image or something?

        Reply
  16. dave

    I’m able combine the start and taskbar layout mods in audit mode. But, after sysprepping, I only get the start menu but none of the Pins in my task bar.

    Anyone have any insight?

    thanks

    Reply
    1. Sach

      Hi Dave,
      Try applying the XML file as part of your deploy task sequence. I have this working for my client SOE.

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *