Introduction
A short and sweet blog post to re-kickstart my blogging activities, after a long period focusing on cybersecurity and the increased cybersecurity threat towards organizations. For same reasons, my Windows 11 project has temporarily been on pause.
However, now I’m back working on Windows 11, showing how you can customize the taskbar during OSD (Operating System Deployment) with Configuration Manager using just PowerShell (and no source files).
And yes, we are still leveraging Configuration Manager for regular OSD. This still makes the most sense for our type of business. 🙂
PowerShell
Find the PowerShell script on my GitHub page here: Windows-11/Import-TaskbarLayout.ps1 at main · imabdk/Windows-11 (github.com)
The script is really simple, though the approach I’m using, creates the required XML for your, rather than including it as a source file in ConfigMgr.
Taskbar XML
The generated XML file is tailored for my needs. It replaces the entire taskbar layout and pins explorer, Edge and Outlook as the only shortcuts.
- For more insight on how to customize the XML itself, see this article on MS Docs: Configure and customize Windows 11 taskbar – Configure Windows | Microsoft Docs
- If required to suit your needs, make the relevant changes to the XML section of the PowerShell script
Configuration Manager
Run the script within your Windows 11 OSD task sequence, using the ‘Run PowerShell Script’ step.
For my various customizations (though I try to keep those at an absolute minimum), I’m using a nested task sequence:
When browsing the script in-console, you should have a view similar to below:
Result
As expected, once the device finishes OSD, the taskbar on Windows 11 is trimmed down to the most relevant. From here, the users can pin their own apps as needed.
ENJOY 🙂
Can this work on Startmenu ?
The start menu is done a tad differently with json, but sure the same concept can be used 🙂
See something like this post: https://ccmexec.com/2021/10/customizing-windows-11-default-start-menu-during-osd-using-layoutmodification-json/
Thank’s
Can we set up the start menu via GPO?
How do you disable the chat icon on the taskbar, with this? Can’t seem to find any documentation on this.
You can take a look inside the PowerShell script to see what I do.
Hi Jonas,
Did you ever figure this out? Even with this powershell script here, the chat icon still exists.
We’re trying to get rid of it since it launches the consumer version of Teams
I was unable to get this to function after mimicking exactly what was above. Nothing changed in the task menu. I applied this after applying the OS in the tasking sequence and booting into the OS
I forgot to mention this is Windows 11 22H2
Yes I am on Win11 22H2 and for some reason after the build completes I am only left with the start button and the search icon.
hello,
for information it’s works perfectly in windows 10 21H2 🙂
Do you have the rest of your TS steps available? I am looking for details on how to Launch Explorer to This PC, and Show This PC on desktop for Windows 11. Thanks in advance!
Hi,
It’s a nice script, thank you for it. Could you please elaborate the thing about removing Chat Icon. I do not see clear from your script how to remove the icon.
Thank you very much in advance
Hello,
Can this be added into a MDT build process as well? If so where in the task sequence would be best to add it?
Once you have deployed this in the OSD and you wanted to update the existing machine what’s the best way to do this. It seems using GPO you cant pin icons to the Start Menu
This doesn’t seem to work on the latest 23H2 release (July 24). Any ideas?
Thanks!
https://www.imab.dk/customize-your-windows-11-23h2-and-onwards-taskbar-during-osd-with-configmgr-using-just-powershell/
Hello,
FYI – it does’nt work with Windows 11 23H2 July – says:
Import-StartLayout : The file C:\WINDOWS\Taskbar.xml is not a valid layout file
I fixed it by using an alternativ to your script
Best
Morten
https://www.imab.dk/customize-your-windows-11-23h2-and-onwards-taskbar-during-osd-with-configmgr-using-just-powershell/
I just do it as a PowerShell step, and inside the step i have:
‘
‘ | Out-File C:\Users\default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml -Encoding UTF8