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?

Nickolaj Andersen
Principal Consultant and Enterprise Mobility MVP. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows deployments and Automation. In 2015 Nickolaj was awarded as PowerShell Hero by the community for his script and tools contributions. Author of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService and a frequent speaker at user groups.

(18382)

comments
  • QWade
    Posted at 04:19 August 4, 2016
    QWade
    Reply
    Author

    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.

  • connavar
    Posted at 13:15 August 4, 2016
    connavar
    Reply
    Author

    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.

    • Steve Whitcher
      Posted at 15:25 August 4, 2016
      Steve Whitcher
      Reply
      Author

      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.

    • Nickolaj
      Posted at 15:34 August 4, 2016
      Nickolaj
      Reply
      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.

    • Bob
      Posted at 18:46 October 6, 2016
      Bob
      Reply
      Author

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

      Thanks

    • daniel
      Posted at 16:09 June 10, 2017
      daniel
      Reply
      Author

      connavar you are a genius man. after so much time, this xml is my final proof that this can be done

  • Steve Whitcher
    Posted at 14:38 August 4, 2016
    Steve Whitcher
    Reply
    Author

    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?

    • Nickolaj
      Posted at 15:34 August 4, 2016
      Nickolaj
      Reply
      Author

      I’ve just updated the post with an example 🙂

  • jessie
    Posted at 15:43 August 4, 2016
    jessie
    Reply
    Author

    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?

  • RobG
    Posted at 20:40 August 4, 2016
    RobG
    Reply
    Author

    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?

  • skatterbrainz
    Posted at 00:14 August 5, 2016
    skatterbrainz
    Reply
    Author

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

  • EvilBetty
    Posted at 21:14 August 5, 2016
    EvilBetty
    Reply
    Author

    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.

  • BranM
    Posted at 19:03 August 8, 2016
    BranM
    Reply
    Author

    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?

    • RobG
      Posted at 19:56 August 10, 2016
      RobG
      Reply
      Author

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

  • Daniel
    Posted at 14:17 August 10, 2016
    Daniel
    Reply
    Author

    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?

  • RobG
    Posted at 20:03 August 10, 2016
    RobG
    Reply
    Author

    @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.

  • Nickolaj
    Posted at 20:11 August 10, 2016
    Nickolaj
    Reply
    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

  • Stefan
    Posted at 08:12 August 23, 2016
    Stefan
    Reply
    Author

    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?

    • Khayyam
      Posted at 13:33 January 11, 2017
      Khayyam
      Reply
      Author

      Hi Stefan,

      we are facing exactly the same problem. Edge Icon is back on taskbar after inplace-Upgrading our Client.

      Did you find any solution for that issue?

      • Jürgen Winter
        Posted at 15:02 April 27, 2017
        Jürgen Winter
        Reply
        Author

        We also have the same problem. After upgrading to the current branch, edge ist back. So far no solution worked to prevent this or to automatically remove edge without affecting applications that are pinned by the user.

  • Sach
    Posted at 00:48 September 28, 2016
    Sach
    Reply
    Author

    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?

    • Sach
      Posted at 23:56 October 9, 2016
      Sach
      Reply
      Author

      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.

      <!—->

  • Sach
    Posted at 23:58 October 9, 2016
    Sach
    Reply
    Author

    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

    • Thomas
      Posted at 06:44 October 17, 2016
      Thomas
      Reply
      Author

      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.

    • Thomas
      Posted at 06:45 October 17, 2016
      Thomas
      Reply
      Author

      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

      • Sach
        Posted at 12:08 October 17, 2016
        Sach
        Reply
        Author

        Hi Thomas,
        I cannot view your XML file.

        Can you save it as an image or something?

  • dave
    Posted at 20:35 November 7, 2016
    dave
    Reply
    Author

    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

    • Sach
      Posted at 11:46 November 9, 2016
      Sach
      Reply
      Author

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

  • Jason
    Posted at 17:49 December 22, 2016
    Jason
    Reply
    Author

    Is there a way to clear all the pinned taskbar icons and not have any icons there? I can clear the default pinned icons, and add my own to the taskbar, but I can’t seem to clear the default and leave the user with a blank taskbar…

  • Luca Fabbri
    Posted at 12:33 January 19, 2017
    Luca Fabbri
    Reply
    Author

    Windows 10 1607 – The “Import-StartLayout” seems to accept *.BIN file only. Export-StartLayout exports to *.XML only. So you cannot import previously customized *.XML directly file without using any tool. File must be converted to BIN.

  • Christian
    Posted at 11:02 January 31, 2017
    Christian
    Reply
    Author

    Great article, thanks for that.
    I did it exactly as you described and replaced the Icons in the Taskbar with File Explorer, IE, Outlook, Skype for Business and Chrome.

    If i login with a new user everything is fine and as intended. If i just log off and directly log back in again with the same user, File Explorer and Explorer are now missing from the taskbar. Outlook, Skype and Chrome are still there.

    Any ideas on that?

    We use roaming profiles without Folder redirection in case that is important.

    • Christian
      Posted at 09:58 February 1, 2017
      Christian
      Reply
      Author

      Nevermind, i figured it out. One GPO “Remove user’s folders from the Start Menu” was the issue.

  • Mike
    Posted at 00:01 March 18, 2017
    Mike
    Reply
    Author

    In regards to your note about applications pinned by the enterprise, I want users to be able to unpin enterprise pinned applications and have that decision stick. Being that importing the start layout with powershell will make the unpinned item return, applying it through group policy doesn’t help as it also enforces that the item stays. Thus I don’t understand the recommendation to use GP.

    Does the taskbar layout have an unpin option for Edge and the Windows Store? I know I can turn off the store icon using GP but not Edge that I’ve fund.

    This is a free MS VM lab to walk you through all these steps. I’m going to have to review it again as it claims you can remove pinned items as wel, but I missed that part if it exists.
    https://technet.microsoft.com/en-us/windows/mt796467

  • CHUA Choon Ki
    Posted at 09:50 July 14, 2017
    CHUA Choon Ki
    Reply
    Author

    Hi Nickolaj,

    I can export my customized Start Menu, however mind to share with me what is the command line to export the customized Taskbar in PowerShell?

    Can both customized Start Menu & Taskbar layout get export at the same time?

    Thank you

    CK

  • Adam
    Posted at 12:36 August 18, 2017
    Adam
    Reply
    Author

    Hi All,

    Hope somebody has an answer to this;

    I’m using an .xml file that contains modifications for both the start layout and the taskbar layout as is done here; https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbar on a Windows 10 1703 Enterprise.

    In testing via MDT, the modification applies successfully, all items are pinned and unpinned as desired. However, this is supposed to be the ‘default’ for new users, allowing them to make changes. When i make changes though, they are overwritten by the .xml at next login, everytime.

    At a loss now, any ideas?

    Thanks,
    Adam

  • Leave a Reply to BranM
    Cancel Reply