We help IT Professionals succeed at work.
Research Question

How do we remove all the applications on a Windows 10 PC's taskbar using GPO?

124 Views
Last Modified: 2020-08-24
How do we remove all the applications on a Windows 10 PC's taskbar using GPO?
GPO settings must apply to a single PC & to all users who sign-in, thanks.
Comment
Watch Question

Dr. KlahnPrincipal Software Engineer
CERTIFIED EXPERT

Commented:
So far as I know what you ask cannot be done directly.

Group Policies can permit things to be done or prohibit things from being done.  But the taskbar would have to be cleaned before applying such a policy.

Removing taskbar applications (either Quick Start or pinned) goes beyond GPO settings and involves multiple Registry keys.  You would need to write a script to remove all the offending keys, then set a Policy that prohibits changing the Taskbar.
GiboSystems Engineer

Author

Commented:
Can you please provide the PowerShell script?
GiboSystems Engineer

Author

Commented:
Any thoughts? Suggestions? Input?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
You can create a reference .XML file that defines apps pinned to the taskbar. Then just use GPO to push the .XML file. It's simple. The example below pins Outlook, Word, Excel, Command Prompt, and File Explorer to the taskbar. You can use the code, this one works perfectly, just edit programs you want to pin.

<?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="C:\Program Files\Microsoft Office 16\root\office16\outlook.exe" />
<taskbar:DesktopApp DesktopApplicationLinkPath="C:\Program Files\Microsoft Office 16\root\office16\winword.exe" />
<taskbar:DesktopApp DesktopApplicationLinkPath="C:\Program Files\Microsoft Office 16\root\office16\excel.exe" />
<taskbar:DesktopApp DesktopApplicationLinkPath="%appdata%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk" />
<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

Configure Windows 10 taskbar
https://docs.microsoft.com/en-us/windows/configuration/configure-windows-10-taskbar

Import-StartLayout

https://docs.microsoft.com/en-us/powershell/module/startlayout/import-startlayout?view=win10-ps

Export-StartLayout

https://docs.microsoft.com/en-us/powershell/module/startscreen/export-startlayout?view=winserver2012r2-ps 
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Yep, that's all linked within my link.
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I didn't refresh the page after finishing my post so I just replied to the original question. Anyway, I provided a little bit more info than just a link without explanation. :-) I guess this counts.
GiboSystems Engineer

Author

Commented:
Did not work, followed all the codes & steps in GPO?

Any thoughts why?

Applied gpupdate /force in Windows 10 PC
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Are the build requirements met?
"In Windows 10, version 1607, Start and taskbar layout control using Group Policy is supported in Windows 10 Enterprise and Windows 10 Education. In Windows 10, version 1703, Start and taskbar layout control using Group Policy is also supported in Windows 10 Pro. "
GiboSystems Engineer

Author

Commented:
Yes, Windows 10 Enterprise & PRO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
That's the edition. What about the build number?
GiboSystems Engineer

Author

Commented:
18363
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Will work. See if you can find a clean machine to test with and repeat the procedure.
GiboSystems Engineer

Author

Commented:
It's a clean test VM already
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Ok, share your xml file, please.
GiboSystems Engineer

Author

Commented:
<?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="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" />
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
GiboSystems Engineer

Author

Commented:
Users would like only to retain the new MS Edge browser in the taskbar
GiboSystems Engineer

Author

Commented:
Still showing the other apps or icons?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Where in the description does it say that you can remove default icons?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Wait, scratch that, it says so.
GiboSystems Engineer

Author

Commented:
The code provided I think only pins the app/s you want in the taskbar but not remove specific apps?
GiboSystems Engineer

Author

Commented:
Take note the GPO was applied in the server for an OU NOT local GPO.
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Are users or computers in that OU? If computers, use the computer configuration section.
GiboSystems Engineer

Author

Commented:
I've configured both startup layout in computer & user admin templates
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I believe it should replace the current layout.

You can do a test. Put the XML file on that computer and use Import-StartLayout to replace the layout. Then see if it replaces the entire taskbar layout.

GiboSystems Engineer

Author

Commented:
You mean via local GPO on the PC?
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
No, directly via Powershell.
GiboSystems Engineer

Author

Commented:
Where to run? In the server? Can you please provide the detailed PowerShell Script?

I might make a typo or mistake, thanks
GiboSystems Engineer

Author

Commented:
I think Import-StartLayout  is only for system images?
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Place the xml file on the server, then open Powershell and run:
Import-StartLayout -LayoutPath "C:\xxx\Layout.xml" -MountPath "C:\"


GiboSystems Engineer

Author

Commented:
Will try now
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I tested this on Windows 10 not Windows Server but I assume it should work the same way.
GiboSystems Engineer

Author

Commented:
Ran & did not work?
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I ran this on Windows 10 a few days ago and it worked perfectly.
GiboSystems Engineer

Author

Commented:
If I apply this in the Windows 10 local GPO, the domain GPO will override it
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I understand. Now we try to test with Powershell that the XML file does what is supposed to do. If you succeed, then test it with GPO.
GiboSystems Engineer

Author

Commented:
It still did not work on the local GPO or Windows 10 PC w/ your PowerShell script? Icons are all still there?
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Now do not use Local GPO and scripts. Just open Powershell.exe and type the command I posted. 
GiboSystems Engineer

Author

Commented:
I did not, I meant run your script in the PowerShell NOT in local GPO, sorry
GiboSystems Engineer

Author

Commented:
& then even if I put the .xml file in the local GPO, it still did NOT work
GiboSystems Engineer

Author

Commented:
Any clues? Input? Fix?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
It works here. With my file, with your file.
However, it does not unpin icons that are there by default.
Please note: if the user unpins edge, it will not return until the xml file is modified again (and he logs on for the next time), even if you just open the file, add one character and delete it again. The timestamp has to change! That is mentioned in the documentation.
Hello ThereSystem Administrator
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
I just tested it and it works as I said. Importing the layout replaces the current layout.

This is what I did:
1. I placed layout.xml to the C:\
Layout.xml (I wanted to pin notepad.exe to 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="%windir%\system32\notepad.exe" />
      </taskbar:TaskbarPinList>
    </defaultlayout:TaskbarLayout>
 </CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
2. I opened Powershell (I was logged on as administrator):
Import-StartLayout -LayoutPath "C:\Layout.xml" -MountPath "C:\"
3. I forgot to mention but you have to restart explorer.exe.
Open Task Manager, find Explorer.exe -> Restart
After I restarted explorer.exe, notepad.exe was pinned and all other icons disappeared.

This is how it works. So when creating a GPO and using the import command, you have to add a line that restarts explorer.exe. That's all.

GiboSystems Engineer

Author

Commented:
Noted, did you guys ran your Start Layout PowerShell commands on the server or Windows 10 PC? & mounted the xml file in the server’s GPO or Windows 10 local GPO?

If in the server, should I update the StartMenu adml & admxl files from Windows 10’s said files?

Please advise
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
The import command can only be carried out with administrative permissions. I used the GPO setting (tested working in both the user settings and the computer settings section). No new ADMX files needed as that is an old setting that DCs of level 2016 or higher already knew.
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
GiboSystems Engineer

Author

Commented:
Will try again & keep you posted, thank  you
GiboSystems Engineer

Author

Commented:
Is this line correct in the XML file for the new Chromium Microsoft Edge browser?

<taskbar:DesktopApp DesktopApplicationLinkPath="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" />

Please advise, thank you.

CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
I took your file, it works, so: yes! All you have to correct is (as written before):
<CustomTaskbarLayoutCollection>
make it
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
GiboSystems Engineer

Author

Commented:
Appreciate much, they are still using the Windows 10 PC & after they've finished I'll start making the changes to xml file in the server.

Is there a specific task to tell the GPO "Startup Layout" option that we applied changes to the xml file? Or any xml file changes are detected automatically?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
They are detected whenever explorer.exe starts, so at logon or when you use task manager to restart it.
GiboSystems Engineer

Author

Commented:
I just made the changes to the server's xml file & GPO StartLayout, running gpupdate on the Windows PC
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
No gpupdate needed. Logoff+logon needed or explorer restart.
GiboSystems Engineer

Author

Commented:
I did & the icons are still in the taskbar, killed explorer.exe & ran it again, logged off & signed in even restarted, didn't work?

Probably I need to remove them manually or unpin the apps & log out then sign in?
GiboSystems Engineer

Author

Commented:
Wow! Now I had it working, I moved the test user on the same OU where I applied the GPO, if another user is in another OU, the GPO settings will not take effect. I need to figure out how to apply this GPO to all users when they access ONLY this Windows PC?

Can you please help how to do that?

Also, I need to remove the Cortana? How?

Thanks!
GiboSystems Engineer

Author

Commented:
Should I add domain users in the OU so that the GPO applies to ALL users?
GiboSystems Engineer

Author

Commented:
Domain users does not work, a security group also did not work?
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Look, this GPO can be assigned to computers. So simply create a new GPO, link it to the computer OU and use security filtering: authenticated users: read. Your single computer: read and apply.
The setting needs to be set in the computer section of the GPO, of course.
GiboSystems Engineer

Author

Commented:
Thank you guys, I got to work via "local" group policy, the GPO in the server will not work, but that's okay.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.