Indexer data location: registry value DataDirectoryComputerHKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search

Policy ID
DataDirectory
Scope
Computer Configuration
Supported on
Microsoft Windows Vista, or any version of Windows with Windows Search 3.01 or later
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Search

Registry

DataDirectory

REG_SZComputer
Enabled value
Depends on the option value
Element
Path (under 128 characters):
Value type
REG_SZ
Required
true
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]

; Value names and types follow the ADMX. Replace <enter value> below with your own data
"DataDirectory"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DataDirectory" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data

New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name 'DataDirectory' -PropertyType String -Value '<enter value>' -Force | Out-Null