- Update Windows 10 multi-app kiosk using Run Script in Microsoft Endpoint Configuration Manager (MEMCM) - Fri, Oct 9 2020
- Deploy a Windows 10 multi-app kiosk with Microsoft Endpoint Manager Configuration Manager (MEMCM) and PowerShell - Fri, Oct 2 2020
- New in Application requests in SCCM 1906 - Mon, Sep 16 2019
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
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!
- 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.