Updated script (about time! many requests and comments) that customizes the Taskbar by adding removal of the copilot icon on the Taskbar and fixing removal of search which I got a lot of comments about that it stopped working.
The original article can be found here: https://ccmexec.com/2022/10/customizing-taskbar-and-start-in-windows-11-22h2-with-powershell/
Search is also fixed but had to be dirty, after an update all existing registry value related to search is overwritten in initial login. Had to solve it for new users by setting the runonce value to change it, it will take about a minute before it is changed after logon.
New features:
-Fixed search remove/customize
-Added removal of the Copilot preview taskbar icon
The script can be used with the following variables:
– RemoveTaskView = Remove Task View from the Taskbar
– RemoveWidgets = Removes widgets from the Taskbar
– RemoveChat = Removes chat from the Taskbar
– MoveStartLeft = Move Start to the left
– RemoveSearch = Remove Search from the Taskbar
– RemoveCopilot = Remove Copilot from the Taskbar
– StartMorePins = Changes the default Start layout to More pins (22H2)
– StartMoreRecommendations = Changes the default Start layout to More recommendations (22H2)
– RunForExistingUsers = Modifies all existing profiles on the computer.
Sample syntax:
powershell.exe -noprofile -executionpolicy bypass -file CustomizeTaskbar.ps1 -RemoveWidgets -StartMorePins –MoveStartLeft
The script can be downloaded from GitHub here: PowerShell/Customize TaskBar and Start Windows 11 at master · Ccmexec/PowerShell · GitHub
Registry value used for detection can be changed in the script.
In Intune we can use this for Win32App detection.
Win32app install syntax:
C:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy bypass -file CustomizeTaskbar.ps1 -RemoveWidgets -StartMorePins
Detection method:
I have had many requests to fix the Search customization and remove Copilot and finally found the time.
Hey Jörgen this is the fix I was looking for , great post.
I did however just install the latest CU for Windows 11 and I may have discovered that the Widgets are now returning in the same way as the Serach Bar did in this article. Doing some testing to confirm and posted an Issue on your Github to verify.
Cheers
Scott
Hej Jörgen!
Thanks for the script. One problem though, I get permission error when using -RemoveWidgets. I tried to add TaskbarDa manually for HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced and get an error then as well. If I add a DWORD value with another name it works just fine but trying to rename it to TaskbarDa generates an error.
I’m running swedish Windows 11 23H2 (22631.4317).
Any advice?
Script output:
Åtgärden har slutförts.
Attempting to run: RemoveWidgets
New-ItemProperty : Det gjordes ett försök att utföra en åtgärd som saknades behörighet för.
At C:\Temp\CustomizeTaskbar_v1_1.ps1:43 char:16
+ … $reg = New-ItemProperty “HKLM:\Default\Software\Microsoft\Window …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (HKEY_LOCAL_MACH…plorer\Advanced:String) [New-ItemProperty], Unautho
rizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.NewItemPropertyCommand
Attempting to run: StartMorePins
Attempting to run: MoveStartLeft
Åtgärden har slutförts.
Never mind my previous post. I found out what’s wrong when running on a fully deployed Windows 11, https://www.elevenforum.com/t/enable-or-disable-userchoice-protection-driver-ucpd-in-windows-11-and-10.24267/. After disabling the UCPD service I can remove widgets successfully. I will try your script in a Task Sequence and I’m relying on it to work just fine there.