⚡ PowerShell 5.1+

Hide Taskbar Search Box

Hides the search box on the taskbar, leaving just an icon or nothing.

By WindowsScripting.com · 707 B
Set-DisableTaskbarSearchBox.ps1
<#
.SYNOPSIS
    Hide Taskbar Search Box.

.DESCRIPTION
    Hides the search box on the taskbar, leaving just an icon or nothing.

    Sets HKCU:\Software\Microsoft\Windows\CurrentVersion\Search \ SearchboxTaskbarMode to 0.

.EXAMPLE
    .\Set-DisableTaskbarSearchBox.ps1
#>

[CmdletBinding()]
param()

$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Search'

if (-not (Test-Path $regPath)) {
    New-Item -Path $regPath -Force | Out-Null
}

New-ItemProperty -Path $regPath -Name 'SearchboxTaskbarMode' -Value 0 -PropertyType DWord -Force | Out-Null

Write-Host "Hide Taskbar Search Box applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green