Disabling the Windows 11 Taskbar Search Box for All Users
Whether you find it useful or not, the Windows 11 taskbar search box is enabled by default and takes up valuable space on your screen.
On special days like National Donut Day, it even adds festive images, like this one:
That's all fun and cute, but if you're like me, you'd rather reclaim that real estate for something else or simply reduce the visual noise.
Disabling the Search Box for the Current User
The easiest way to hide the search box is through the taskbar settings:
You can also hide it by using this PowerShell one-liner to set the SearchboxTaskbarMode registry key to 0:
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Value 0 -Type DWORD
This change takes effect immediately. No restart or logoff required.
Disabling the Search Box for All Users
To make this setting apply automatically to all new user accounts, you need to modify the default user registry hive located at C:\Users\Default\NTUSER.DAT. The following PowerShell script loads the hive, sets the required registry values, and unloads it cleanly:
$DefaultUserReg = "HKLM\TempDefault"
$NtuserDatPath = "C:\Users\Default\NTUSER.DAT"
reg load $DefaultUserReg $NtuserDatPath
$HKDU = "Registry::$DefaultUserReg"
$RegSearchPath = "$HKDU\Software\Microsoft\Windows\CurrentVersion\Search"
New-Item -Path $RegSearchPath -Force | Out-Null
Set-ItemProperty -Path $RegSearchPath -Name "SearchboxTaskbarMode" -Value 0 -Type DWORD
Set-ItemProperty -Path $RegSearchPath -Name "SearchboxTaskbarModeCache" -Value 1 -Type DWORD
[GC]::Collect()
[GC]::WaitForPendingFinalizers()
reg unload $DefaultUserReg
That's it. You can integrate this step into your provisioning scripts or golden images to ensure new users won't see the search box by default.
The Search Box That Wouldn't Go Away
Initially, I tried setting only SearchboxTaskbarMode, but the value kept getting reset when a new user profile was initialized. Using Process Monitor, I traced the behavior to a function named TryMigrateSearchConditionally inside C:\Windows\System32\Taskbar.dll:
To better understand what was happening, I examined the decompiled function in IDA. It turns out that Windows also checks for SearchboxTaskbarModeCache. If this key is missing, the function assumes no user preference exists and "migrates" the setting by assigning a default value of 2 to SearchboxTaskbarMode, which re-enables the search box.