- Remote help for Intune and Microsoft Endpoint Manager - Tue, Jan 25 2022
- Windows 10/11 Azure AD/Intune Enterprise subscription is not valid - Mon, Nov 8 2021
- Upgrade from Windows 10 to Windows 11 with Setupconfig.ini and Intune - Wed, Sep 22 2021
The feature we used to deploy a customized Start menu in Windows 10 has been extended with the ability to manage pinned items on the Taskbar. There are some unsupported solutions for importing a Taskbar layout during OS deployment. However, now we can do it in a supported manner, and we can even add items using Group Policy after we create the user profile.
Note that this feature requires Windows 10 Enterprise/Education and it only works in Windows 10 1607. (Editor's note: There is some evidence that this feature works in Windows 10 Pro. Please share your experiences in a comment.) We cannot use this feature to remove items the user pinned to the Taskbar; we can only remove items from the Taskbar that we added with the new feature.
The Taskbar layout is configured in an .xml file either together with the Start menu layout or in a separate file. The .xml file can then be deployed using different tools according to which suits your organization best.
Sample .xml file used to modify the Taskbar
This sample file will give the following layout on the Taskbar:
<?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> <defaultlayout:TaskbarLayout> <taskbar:TaskbarPinList> <taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk"/> </taskbar:TaskbarPinList> </defaultlayout:TaskbarLayout> </CustomTaskbarLayoutCollection> </LayoutModificationTemplate>
Sample .xml file for Start menu and Taskbar
The sample file below includes the layout configuration for the Start menu and the Taskbar as shown in the screenshot:
The corresponding .xml file looks 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"> <DefaultLayoutOverride LayoutCustomizationRestrictionType="OnlySpecifiedGroups"> <StartLayoutCollection> <defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"> <start:Group Name="Corporate shortcuts" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"> <start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" /> <start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\internet explorer.lnk" /> <start:Tile Size="2x2" Column="4" Row="0" AppUserModelID="Microsoft.Messaging_8wekyb3d8bbwe!x27e26f40ye031y48a6yb130yd1f20388991ax" /> <start:SecondaryTile AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" TileID="CCMEXEC" Arguments="http://ccmexec.com" DisplayName="CCMEXEC" Square150x150LogoUri="ms-appx:///Assets/MicrosoftEdgeSquare150x150.png" Wide310x150LogoUri="ms-appx:///Assets/MicrosoftEdgeWide310x150.png" ShowNameOnSquare150x150Logo="true" ShowNameOnWide310x150Logo="false" BackgroundColor="#2E9AFE" Size="2x2" Row="0" Column="6"/> </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="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk"/> </taskbar:TaskbarPinList> </defaultlayout:TaskbarLayout> </CustomTaskbarLayoutCollection> </LayoutModificationTemplate>
Remove the default pinned apps
We have the option to either keep the default pinned apps (Edge, Store, and File Explorer) or delete them. If we delete them, we can add them back again using the same .xml file that we use to delete them. In my example, I have added the Messaging app and Internet Explorer to the Taskbar.
To remove the default pinned items, you have to replace <CustomTaskbarLayoutCollection> with
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
If we want to keep Edge and File Explorer and only remove the Store app, we can add both apps back to the .xml file by adding the following lines:
We then get a Start menu that looks like this:
How to find the AppUserModelID
To add a modern app, we need the AppUserModelID. To find the ID, you can add the app to the Start menu and then use PowerShell to export the Start menu layout with the Export-StartLayout cmdlet to an .xml file.
For instance, to get the AppUserModelID for the Camera app you can follow this procedure:
- Add the modern app to the Start menu by right-clicking the Camera app and selecting Pin to Start.
- Launch PowerShell as standard user.
- Export the Start menu to an .xml file using the following command:
Export-StartLayout -Path C:\temp\Camera.xml - Open the exported XML file using Notepad and copy the AppUserModelID.
- Then add the line below to the Taskbar.xml file:
<taskbar:UWA AppUserModelID="Microsoft.WindowsCamera_8wekyb3d8bbwe!App" />
Import a Taskbar layout using PowerShell
The easiest way to test if your XML file works as intended is to use the PowerShell cmdlet Import-StartLayout as a local administrator:
Import-StartLayout -layoutpath C:\temp\layoutfile.xml -Mountpath C:\
Then log on to the computer with a user account that has no profile on the machine, and the Taskbar modifications should be applied.
Of course, you can use PowerShell to deploy the Taskbar with a script, and you can also use the above command during OS deployment, such as with Configuration Manager.
Adding a Taskbar layout with SSCM
Deploying a Taskbar layout during OS deployment with Configuration Manager is done exactly the same way as with the Start menu in Windows 10. You can simply add the information to the same .xml file that you use for the Start menu.
Here is how to deploy a Taskbar layout with SCCM:
- Create a folder in your Configuration Manager package source folder.
- Copy the .xml file to be used during OS deployment to this folder.
- Create a PowerShell script in that directory with the following content:
Import-StartLayout -LayoutPath $PSScriptRoot\StartMenu.xml -MountPath $env:SystemDrive\ - Create a package using this source folder.
- Distribute the package to the appropriate distribution points.
- In your OS deployment task sequence, add a step to import the .xml file that must run after the “Set up Windows and Configuration Manager” step (for the OS to be deployed, not for Windows PE)
Use the following command to run the PowerShell script and make sure to select the package we created earlier:
Powershell.exe -NoProfile -ExecutionPolicy ByPass -File ImportLayout.ps1
Deploy Taskbar using Group Policy
We can also use a Group Policy to the Taskbar layout, which I assume will be the most used option because it allows you to change Taskbar configuration at any time. When the computer starts up, it will check if the .xml file has been modified and apply any changes.
- Copy the .xml file to a file share that domain members can access.
- Navigate to the Group Policy setting Start Layout, which is located under Computer Configuration > Policies > Administrative Templates > Start Menu and Taskbar
- Configure the Group Policy with the path to the .xml file.
Note that the Group Policy enforces the Taskbar/Start menu layout on user computers.
The .xml file is very sensitive to additional characters like an extra space at the end of a line. I recommend you try your .xml file as a local administrator with the PowerShell command explained above before you deploy it with Group Policy. If your .xml file contains syntax errors or illegal characters, you have the chance to get it right before you mess up the configuration on user computers.
PowerShell validates the .xml file and writes results to c:\users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml. This allows you to detect possible errors.
Subscribe to 4sysops newsletter!
FAQ
- What happens if a user deletes an item we pinned to the Taskbar using the .xml file and Group Policy?
Users can delete an item we pinned to the Taskbar. However, the icon will be added back the next time that we modify the .xml file. If you don't modify the .xml file, the user's configuration won't change. - What if I add a shortcut that the user has already pinned to the Taskbar?
Nothing happens. Windows won't add a second icon. - What if we pin an item the end user has already pinned to the Taskbar, and then we remove the icon through our .xml file?
The icon won't be removed. - What if we remove a pinned app in the.xml file that we deployed with Group Policy?
The pinned item will be removed from the Taskbar as soon the Group Policy is applied when the user logs on again. - What if a user changes the order of the pinned items in the Taskbar?
The user's order configuration will be maintained when we add or remove items. - What happens to the Taskbar if the computer is no longer targeted by a Group Policy?
The Taskbar will keep the configuration that we previously deployed via Group Policy. - What happens if I add Taskbar shortcuts to an .xml that is applied to Windows 10 1511 machines?
Older version of Windows 10 can't read this .xml file and will ignore it altogether.
Read the latest IT news and community updates!
Join our IT community and read articles without ads!
Do you want to write for 4sysops? We are looking for new authors.
Hi,
No it is not supported on Server 2012 R2 it is only supported in Windows 10 1607 and later.
Regards,
Jörgen
Hi Jörgen,
We finally started to make the jump to Windows 10, so I also was looking for some start menu customizations. Seemed easy to implement (very good article!), but this doesn’t work in 1709 anymore. Explorer is crashing constantly, which makes the desktop useless.
I followed your examples and they worked for me to get rid of the default taskbar icons and to add my own adding the xml file thru GPO.
But I also need to have only selected icons show in the notification area by the time. I would like this be set up for all users.
I know how to do it one user at a time, but I would like it to be already set when a user / new user signs on.
I don’t understand this line:
Import-StartLayout -layoutpath C:\temp\layoutfile.xml -Mountpath C:\
so you just import it to the C drive? doesn’t this need to live someplace else to work?
You make it seem like just doing this will work on the PC you do it too.
Hi,
The command requires that you point to an installation of the running Windows 10 os and C:\ is the root path, so it will place it in the correct location based on that and work on the PC you run it on.
Regards,
Jörgen
Jorgen, Any chance that you might know how to show only certain icons in the notification area by the time for everyone? I am entry level IT for a medical business and they want employees to have these icons shown. I know how to do it by user. But is there a way to do it thru the registry, GPO.. etc…. for those icons to show up as when a new user logs in?
Has anyone had any luck deploying a website link that is pinned to the taskbar? Microsoft has made the most simple of tasks impossible in Windows 10.
Its almost like they haven’t even tested this OS for business, why the hell does enterprise even have Xbox in it, yes it can be removed with PowerShell but why is it even installed and why do scripts need to be used in 2018, this much micromanagement to deploy an OS is insane.
Does this work in the latest versions of Windows 10 such as versions 1909 and 2004?
Jorgen,
Thanks for explaining this so good. I have written something that would only have the Edge and File Explorer on the taskbar. The Cortana search bar has been removed but the other search bar shows up and the local weather shows . I am trying to remove both of this and apply this xml through Local Group Policy and I have not been able to do it successfully, My XML file is shown below.
I tried to place this file both under C:\Users\ folder and under C:\Windows\System32 folder and still it does not apply when tried through local group policy. We have not yet tested it applying from the domain level yet as my manager wants it applied from local Group Policy.
Any suggestions where I might be wrong or is he script not written properly.
xmlns:taskbar=”http://schemas.microsoft.com/Start/2014/TaskbarLayout”