Customization of the taskbar

The below command allows unpining of apps,
It would be nice and save time if we can customise the taskbar without locking it down

 $appname = "Mail"
 ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true}

@Benjamin_Danet this has been tried before.
It doesn’t work from the SYSTEM context and only works when the user is logged in.

If your wanting to configure a default start menu/task bar best bet really would be to create the layout you want with the XML file and replace it over the default shell file:

Create an export your DefaultLaouts.xml and LayoutModification.xml files and replace the defaults with them located at \Users\Default\AppData\Local\Microsoft\Windows\Shell\

This means you won’t be using the GPO approach that keeps the start menu and taskbar locked, but there isn’t a way to manage it moving forward unless someone has found another method.

Works fine on Win 10 but I believe @Anthony_Birone had said these xml approach doesn’t work on 11.