Default excluded paths: registry value DefaultExcludedPaths_2 (HKCU Windows Search)UserHKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Search

Policy ID
DefaultExcludedPaths_2
Scope
User Configuration
Supported on
Any version of Microsoft Windows with Windows Search 4.0 or later
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Search

Registry

(list values)

REG_SZUser
Enabled value
Depends on the option value
Element
Default Excluded Paths
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths]
"<enter value>"="<enter value>"
CMD
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths" /v "<enter value>" /t REG_SZ /d "<enter value>" /f
PowerShell
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths' -Name '<enter value>' -PropertyType String -Value '<enter value>' -Force | Out-Null