Disable remote access to search index
- Windows onlyThis script improves your privacy on Windows
- Single actionThis page belongs to a script, containing basic changes to achieve a task.
- Impact: Minimum
System Functionality / Data Loss Risk: Low
This action improves privacy with minimal impact when you run the recommended script.
- Batch (batchfile)These changes use Windows system commands to update your settings.
- Administrator rights requiredThis script requires privilege access to do the system changes
- Fully reversible
You can fully restore this action (revert back to the original behavior) using this website.
The restore/revert methods provided here can help you fix issues.
Overview
This disables remote access to the search index of your computer 1 2 3 4.
By executing this script, other computers will no longer be able to query your computer's search index remotely 1 2 4. This means that when others are browsing network shares on your computer, they cannot use its index for searching 1 2 4. By default, without this script, client computers can search using the host's index 1 2 3 4, which might pose a privacy concern.
Implementing this change is crucial for maintaining both the privacy and security of your search data. Not restricting this access is recognized as a security vulnerability 5.
The script targets the following registry key to implement the change:
HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search!PreventRemoteQueries
1 2 4 5.
Sources
- Search Policy CSP - Windows Client Management. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-search
Archived: https://web.archive.org/web/20240120140023/https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-search#preventremotequeries - Prevent clients from querying the index remotely. admx.help. (2024).
Original: https://admx.help
Archived: https://web.archive.org/web/20240120200959/https://admx.help/?Category=Windows_10_2016&Policy=FullArmor.Policies.3B9EA2B5_A1D1_4CD5_9EDE_75B22990BC21::PreventRemoteQueries - Device restriction settings for Windows 10/11 in Microsoft Intune. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/mem/intune/configuration/device-restrictions-windows-10
Archived: https://web.archive.org/web/20240120200946/https://learn.microsoft.com/en-us/mem/intune/configuration/device-restrictions-windows-10#search - Prevent clients from querying the index remotely. Windows security encyclopedia. www.windows-security.org. (2024).
Original: https://www.windows-security.org/bcf256ddaff391fa2a294d42ffecbd90/prevent-clients-from-querying-the-index-remotely
Archived: https://web.archive.org/web/20240120200943/https://www.windows-security.org/bcf256ddaff391fa2a294d42ffecbd90/prevent-clients-from-querying-the-index-remotely - SecPod SCAP Repo, a repository of SCAP Content (CVE, CCE, CPE, CWE, OVAL and XCCDF). www.scaprepo.com. (2024).
Original: https://www.scaprepo.com/control.jsp
Archived: https://web.archive.org/web/20240120200943/https://www.scaprepo.com/control.jsp?command=relation&relationId=CCE-93119-6&search=CCE-93119-6
Apply Now
Choose one of three ways to apply:
Download script
Download and run the script directly- No app needed
- Offline usage
- Easy-to-apply
- Free
- Open-source
Help
How to apply or restore "Disable remote access to search index" using script
- ≈ 2 min to complete
- Tools: Web Browser
- Difficulty: Simple
- ≈ 5 instructions
- 1
Download
Download the script file by clicking on thebutton above.
Use button above to restore changes. - 2
Keep the file
If warned by your browser, keep the file. - 3
Open
Open the downloaded file. - 4
Exit
Once it's done, press any key to exit the window. - 5
Restart
Restart your computer for all changes to take effect.
Apply with privacy.sexy
Guided, automated application with safety checks- Recommended for most users
- Includes safety checks
- Free
- Open-source
- Popular
- Offline/Online usage
Help
How to apply or restore "Disable remote access to search index" using privacy.sexy
- ≈ 3 min to complete
- Tools: privacy.sexy
- Difficulty: Simple
- ≈ 4 instructions
- 2
Choose script
- Search for the script name: Disable remote access to search index
- Check the script by clicking on the checkbox.
- 3
Run
Click on ▶️ Run button at the bottom of the page.This button only appears on desktop version (recommended). On browser, use 💾 Save button.
- Apply
- Revert
:: Set the registry value: "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search!PreventRemoteQueries"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search'; $data = '1'; reg add 'HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search' /v 'PreventRemoteQueries' /t 'REG_DWORD' /d "^""$data"^"" /f"
:: Suggest restarting explorer.exe for changes to take effect
PowerShell -ExecutionPolicy Unrestricted -Command "$message = 'This script will not take effect until you restart explorer.exe. You can restart explorer.exe by restarting your computer or by running following on command prompt: `taskkill /f /im explorer.exe & start explorer`.'; $warn = $false; if ($warn) { Write-Warning "^""$message"^""; } else { Write-Host "^""Note: "^"" -ForegroundColor Blue -NoNewLine; Write-Output "^""$message"^""; }"
Ijo6IERlbGV0ZSB0aGUgcmVnaXN0cnkgdmFsdWUgXCJIS0xNXFxTT0ZUV0FSRVxcUG9saWNpZXNcXE1pY3Jvc29mdFxcV2luZG93c1xcV2luZG93cyBTZWFyY2ghUHJldmVudFJlbW90ZVF1ZXJpZXNcIlxuUG93ZXJTaGVsbCAtRXhlY3V0aW9uUG9saWN5IFVucmVzdHJpY3RlZCAtQ29tbWFuZCBcInJlZyBkZWxldGUgJ0hLTE1cXFNPRlRXQVJFXFxQb2xpY2llc1xcTWljcm9zb2Z0XFxXaW5kb3dzXFxXaW5kb3dzIFNlYXJjaCcgL3YgJ1ByZXZlbnRSZW1vdGVRdWVyaWVzJyAvZiAyPiRudWxsXCJcbjo6IFN1Z2dlc3QgcmVzdGFydGluZyBleHBsb3Jlci5leGUgZm9yIGNoYW5nZXMgdG8gdGFrZSBlZmZlY3RcblBvd2VyU2hlbGwgLUV4ZWN1dGlvblBvbGljeSBVbnJlc3RyaWN0ZWQgLUNvbW1hbmQgXCIkbWVzc2FnZSA9ICdUaGlzIHNjcmlwdCB3aWxsIG5vdCB0YWtlIGVmZmVjdCB1bnRpbCB5b3UgcmVzdGFydCBleHBsb3Jlci5leGUuIFlvdSBjYW4gcmVzdGFydCBleHBsb3Jlci5leGUgYnkgcmVzdGFydGluZyB5b3VyIGNvbXB1dGVyIG9yIGJ5IHJ1bm5pbmcgZm9sbG93aW5nIG9uIGNvbW1hbmQgcHJvbXB0OiBgdGFza2tpbGwgL2YgL2ltIGV4cGxvcmVyLmV4ZSAmIHN0YXJ0IGV4cGxvcmVyYC4nOyAkd2FybiA9ICAkZmFsc2U7IGlmICgkd2FybikgeyBXcml0ZS1XYXJuaW5nIFwiXlwiXCIkbWVzc2FnZVwiXlwiXCI7IH0gZWxzZSB7IFdyaXRlLUhvc3QgXCJeXCJcIk5vdGU6IFwiXlwiXCIgLUZvcmVncm91bmRDb2xvciBCbHVlIC1Ob05ld0xpbmU7IFdyaXRlLU91dHB1dCBcIl5cIlwiJG1lc3NhZ2VcIl5cIlwiOyB9XCIi
Help
How to apply or restore "Disable remote access to search index" using commands
- ≈ 2 min to complete
- Tools: Command Prompt
- Difficulty: Medium
- ≈ 3 instructions
- 1
Open Command Prompt
Open Command Prompt as Administrator. - 2
Copy code
Copy the code: - 3
Paste & run
Paste the commands into Command Prompt and press Enter to run.Some changes require a system restart to take effect
Similar Guides
Wider Goal
Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.
These plans combine multiple privacy settings, including this one, for stronger protection.
- Disable privacy-invasive indexing
- Disable Windows search data collection
- Disable OS data collection
This category is dedicated to preventing privacy-invasive indexing features within Windows. Indexing can include details from emails, documents, and other files th...
This category is dedicated to minimizing the personal data collected and utilized by Windows Search and Cortana. It encompasses a range of scripts designed to curt...
Disable OS data collection — to reduce data exposure leveraging important data privacy safeguard on Windows. What follows is, this guidance provides instructions t...
Same Goal
Other guides in Disable privacy-invasive indexingSee settings that are in the same category as this guide.
Using other actions in the same category may help you achieve your goal better.
About the Creators
These people have authored this documentation and written its scripts:
Reviewed By
This guide has undergone comprehensive auditing and peer review:Expert review by undergroundwires
- Verified technical accuracy and editorial standards
- Assessed system impact and user privacy risks
Public review by large community
- Privacy enthusiasts and professionals peer-reviewed
- Millions of end-users tested across different environments
History
We continually monitor our guides, their impact and all other privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.