HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Windows 11 Windows 11Windows SearchIndexingGroup PolicyIntuneTroubleshootingPowerShell

Windows Search finds nothing, or eats the disk: the index, its database, and the rebuild you should almost never do blindly

IA
Imran Awan
21 August 2026

A user tells you search is broken. They type a filename they can see in File Explorer, and the Start menu returns nothing. Or the opposite: the disk light never goes out, SearchIndexer.exe is at the top of Task Manager, and a laptop that used to last a day now lasts four hours. Both tickets get the same reflex answer from most helpdesks: rebuild the index. That reflex is wrong far more often than it is right, and it is expensive when it is wrong. This post explains what the Windows Search index actually is, where it lives on disk, what decides whether a folder is even eligible to be searched, and the order in which you should check things so that a rebuild is the last thing you do rather than the first.

The short version

The Windows Search index is a real database on disk, at C:\ProgramData\Microsoft\Search\Data\Applications\Windows, named Windows.db on Windows 11 and Windows.edb on Windows 10. Most "search finds nothing" tickets are a crawl-scope or Group Policy problem, not a corrupt database, and a rebuild reproduces the exact same exclusion after hours of disk churn. Microsoft documents letting the indexer run up to 24 hours to rebuild. Check the service, then the scope, then policy, then the event log, and only rebuild when the log actually says the data is damaged.

The problem: two very different tickets, one wrong answer

Windows Search failures arrive in two shapes, and they have almost nothing in common.

The first shape is a silent miss. The file exists. The user can open it. Search does not return it. This is almost never database damage. It is nearly always that the folder holding the file is not in the index at all, so there is nothing to return.

The second shape is resource consumption. The indexer is reading and writing constantly, the database has grown to several gigabytes, and the machine feels slow. This is a capacity and scope problem: too much content is in scope, or the content in scope is enormous.

The reflex fix for both is the Rebuild button in Indexing Options. Microsoft's own performance guidance tells you what that costs: "Let the Indexer run for up to 24 hours to rebuild the index database." During that window search results are incomplete by design. On a laptop that sleeps and runs on battery, the real elapsed time is longer, because the indexer throttles itself when the device is busy or unplugged.

A rebuild is a destructive operation with a long tail. It discards the entire property store and inverted index and re-crawls every location in scope. Search is degraded for the whole rebuild, and on a large roaming or redirected profile it can run for the better part of a day. Never do it as a first step, and never do it fleet-wide from a management tool without knowing the scope size on the target devices.

Why it happens: a service, a crawler, a scope list and a database

Before you can triage this you need to know what the moving parts are. There are four, and they fail in different ways.

What the index actually is, in plain English. It is a local database that stores two things about every file in scope. First, its properties: name, path, size, dates, author, and whatever else the file type exposes. Second, the words inside it, stored in an inverted index so that a word can be mapped back to the files containing it. When you search from Start or File Explorer, nothing walks the disk. A query is run against that database. If a file is not in the database, it does not exist as far as search is concerned.

The chain, from trigger to result

Here is the order of operations. Each arrow is a real process boundary.

  1. The Windows Search service (short name WSearch) starts and hosts SearchIndexer.exe. Nothing else happens until this service is running.
  2. The gatherer inside the indexer reads the crawl scope: the list of locations that are in and out of scope. It gets that list from the registry, from user choices in Indexing Options, and from Group Policy.
  3. For each location, a protocol handler is loaded to enumerate items. Handlers run out of process in SearchProtocolHost.exe so a bad handler cannot take the indexer down with it.
  4. For each item, a filter handler is loaded to extract text and properties. A filter handler is an implementation of the IFilter COM interface. These run in SearchFilterHost.exe, again out of process, for the same reason.
  5. The extracted properties and text are written into the catalog database on disk.
  6. A query from Start, File Explorer or an application goes through tquery.dll and the Search OLE DB provider into that same database.

Notice what that chain means for triage. A missing result can be caused at step 2 (not in scope), step 3 (location unreachable), step 4 (no filter for that file type, so no content was extracted) or step 5 (damaged data). Only the last of those is fixed by a rebuild.

Where the database lives, and what it is called

This is the single most common factual error in older guidance. Microsoft's troubleshooting article is explicit that the file name changed with Windows 11.

C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.db
C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb

The first is Windows 11. The second is Windows 10. Both live in the same folder. Microsoft also tells you to read its size using the Size on disk property rather than Size, because the indexer uses sparse and compressed files and the plain Size value can be wildly misleading.

Gotcha: scripts that look for Windows.edb silently report zero on Windows 11. If you inherited a monitoring check or a remediation script written for Windows 10, it is probably testing for Windows.edb. On Windows 11 that path does not exist, so a naive script reports the index as absent or size zero and can trigger a rebuild that was never needed. Look for both names and report which one you found.

Alongside the main catalog you will see companion files created by the same engine. On a Windows 11 24H2 device the folder held Windows.db, Windows-gather.db and Windows-usn.db, each with -wal and -shm sidecars. The gather database tracks crawl state. The USN database tracks the NTFS change journal position, which is how the indexer knows what changed without re-walking the disk. Those file names are observed on a live device and are not documented by Microsoft. Do not build detection logic on them, because an undocumented internal file layout can change in any update.

The crawl scope: the thing that actually decides what is searchable

Scope is where most of your tickets live. There are three sources of scope rules, and they have a documented order of precedence.

Microsoft's Group Policy documentation for Windows Search states the precedence explicitly, from strongest to weakest: prevention policies, then user excludes, then user includes, then default excludes, then default includes. Read that once more, because it is the whole game. A prevention policy beats everything. If policy prevents a path, the user cannot re-add it in Indexing Options, and the option to do so is blocked in the interface.

On disk, the scope lives under the crawl scope manager. Here is what a Registry Editor session looks like on a healthy device.

Registry Editor
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex
  +-- DefaultRules     ItemCount = 0x18 (24)
  +-- WorkingSetRules  ItemCount = 0x3c (60)
  +-- SearchRoots

...\WorkingSetRules\0
  URL      REG_SZ    file:///C:\Users\*\AppData\Local\Temp\
  Include  REG_DWORD 0x0
  Policy   REG_DWORD 0x0
  Default  REG_DWORD 0x1

Read it like this. DefaultRules holds the rules Windows ships with, which is why your temp folders and C:\Windows are never in the index. WorkingSetRules holds the live effective set. Include set to 0 means exclude; 1 means include. Policy set to 1 means the rule came from Group Policy and the user cannot override it. That single DWORD is often the answer to the whole ticket.

Gotcha: Microsoft documents the policy behaviour but not this key layout. The CrawlScopeManager and Gather subkeys are real and stable enough to read for diagnosis, but Microsoft does not publish their schema. Read them to answer "why is this path not indexed". Do not write to them, and do not treat the value names as a contract.

Registry reference for the whole feature area

Everything below shares one parent key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search
Value or subkeyWhat it holdsStatus
DataDirectoryExpandable path to the Search data root. Default %ProgramData%\Microsoft\Search\Data\. The catalog sits under Applications\Windows beneath it.Path documented; the value name is observed
DefaultDataDirectoryThe shipped default, so you can tell whether the index has been relocated.Observed
SetupCompletedSuccessfully1 when the Search component finished its own setup. Anything else means repair the component, not the data.Observed
EnablePerUserCatalogEnables Windows per-user search catalogs. Named in Microsoft's FSLogix search roaming guidance.Documented
CurrentVersionBuild of the Search component, useful when comparing two devices.Observed
CrawlScopeManager\Windows\SystemIndexDefaultRules, WorkingSetRules and SearchRoots: the effective scope.Observed
Gather\Windows\SystemIndexLogDirectory and StreamLogsDirectory: where the crawl logs are written.Observed

Policy values land in a separate tree. This is the one you check when a user swears they never excluded anything.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search

Microsoft's Search Policy CSP documentation names that exact key as the registry target for the machine policies, and the archived Windows Search Group Policy article confirms the matching user hive at HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Windows Search. Windows only creates the subkey when a policy is actually applied, so an absent key means no policy, not a read failure.

System files and DLLs in the flow

All of these live in C:\Windows\System32 and were confirmed present on a Windows 11 24H2 device. Where the table quotes a file description in italics, that string was read from the binary's own version resource, not inferred. Microsoft does not publish a component map for this feature area, so treat the internal role of each library as informed reading rather than documented fact.

BinaryRole in the flow
SearchIndexer.exeThe service host. Runs as LocalSystem with the command line SearchIndexer.exe /Embedding. Owns the gatherer and the catalog.
SearchProtocolHost.exeOut-of-process host for protocol handlers. Enumerates items in a content source.
SearchFilterHost.exeOut-of-process host for filter handlers (IFilter). This is the process that dies when a third-party filter misbehaves.
tquery.dllThe query layer. Also the event message resource for the Microsoft-Windows-Search provider, which is why event text renders even when the service is stopped.
mssrch.dllShips with the file description Microsoft Embedded Search. The core engine the indexer loads.
query.dllFile description Content Index Utility DLL. The older content-index query surface, retained for compatibility.
mssvp.dllFile description MSSearch Vista Platform. Part of the platform layer under the indexer.
msscntrs.dllFile description PKM Perfmon Counter DLL. Supplies the Search Indexer and Search Gatherer performance counter sets registered under Windows Search\PerformanceCounters.
structuredquery.dllFile description Structured Query. Parses Advanced Query Syntax, the kind: and author: style query language.
SearchFolder.dllThe shell folder implementation behind search results in File Explorer.

The filter handler model is worth a moment because it explains a whole class of "the file is indexed but searching its contents finds nothing". A filter handler is registered per file extension through a persistent handler in the class registry. You can read the registration directly.

PowerShell - run elevated
# Which filter handler is registered for .docx? Read-only registry lookup. Get-ItemProperty 'HKLM:\SOFTWARE\Classes\.docx\PersistentHandler' | Select-Object -ExpandProperty '(default)' {D3B41FA1-01E3-49AF-AA25-1D0D824275AE} # Healthy: a GUID comes back, and it matches the DOCX filter GUID Microsoft # publishes in the "Prevent Unwanted IFilters and Protocol Handlers" policy docs. # Broken: the key is missing entirely, which means no content extraction for # that extension. Properties still index; the words inside the file do not.

Microsoft publishes the GUIDs for its own shipped filters in that policy article, which makes them a useful known-good baseline: Plain Text is {c1243ca0-bf96-11cd-b579-08002b30bfeb}, HTML is {e0ca5340-4534-11cf-b952-00aa0051fe20}, XLSX is {4887767F-7ADC-4983-B576-88FB643D6F79}. If a persistent handler for a common Office extension has been replaced by a third-party GUID, you have found your content-extraction problem.

Event log: the channel is not where you expect

Your prompt, and a great deal of community guidance, will tell you to open Microsoft-Windows-Search/Operational. That channel does not exist. Enumerating the registered providers on a Windows 11 device gives this mapping.

ProviderChannel it writes to
Microsoft-Windows-SearchApplication log
Microsoft-Windows-Search-ProfileNotifyApplication log
Microsoft-Windows-Search-CoreMicrosoft-Windows-Search-Core/Diagnostic
Microsoft-Windows-Search-ProtocolHandlersMicrosoft-Windows-Search-ProtocolHandlers/Diagnostic
Microsoft-Windows-UI-SearchMicrosoft-Windows-SearchUI/Operational and /Diagnostic
Gotcha: there is no Search Operational channel, and the Diagnostic channels are disabled by default. Everything you need for routine triage is in the plain Application log, filtered by source Microsoft-Windows-Search. If you built an Event Viewer custom view or a log-collection rule pointing at an Operational channel for Search, it has been collecting nothing.

Microsoft does not publish a consolidated Event ID reference for Windows Search on Windows client. The nearest official page, "Event Log Messages", documents the retired Indexing Service, not this component. The IDs below were read from the provider message resource in tquery.dll on a Windows 11 24H2 device, and the ones marked as observed were also seen as real records in the Application log on that device. Treat them as a triage aid, not a contract.

Event Viewer > Windows Logs > Application > filter by source Microsoft-Windows-Search
Event IDMeaningWhat it tells you to do
1003 (observed)The Windows Search Service started.Baseline. Count restarts to spot a crash loop.
1013 (observed)Windows Search Service stopped normally.Something asked it to stop. Look for a tuning utility or antivirus.
1004 / 1005Creating, then successfully created, the new search index, with a Reason field.A rebuild is in progress or completed. The Reason field tells you who asked.
1015 (observed)Event N has been suppressed X times since T.The real error is being rate limited. Go and read the ID it names.
1016 / 1017Failed, or succeeded, moving index files from one path to another.Relocation outcome. 1016 usually means the target was not empty or SYSTEM cannot write there.
1019Failed to process the list of included and excluded locations.Scope problem. Fix the rules, not the database.
3023 / 3024Update cannot start: all content sources excluded by path rules, or sources unreachable.The clearest possible "this is scope, not corruption" signal.
3036 / 3037Crawl could not be completed, or started, on a content source.Usually an unreachable network or offline location.
3054Update delayed because a disk is full.Check the index volume and the system temp location.
3086The system locale changed. Existing data will be deleted and the index must be recreated.A legitimate, documented cause of an unexpected rebuild.
3602 (observed)Error ID N happened in Windows Search recovery stage. Restart the service; if it persists, recreate the index.Paired with 7042. This is real damage.
4138An index corruption was detected in component C in catalog X.Damage confirmed. A rebuild is on the table.
7040Corrupted data files detected in the index. The service will attempt to rebuild automatically.Windows is already rebuilding. Do not also click Rebuild.
7042 (observed)The service is being stopped because there is a problem with the indexer.Read the context string. "Recovery phase failed" means the catalog did not come back.
10023 / 10024 (observed)The protocol host, or filter host, process did not respond and is being forcibly terminated.A handler or filter is hanging. Suspect a third-party IFilter, not the database.
Gotcha: the manifest ID and the logged ID can disagree. The message for "Error ID N happened in Windows Search recovery stage" is numbered 4169 in the tquery.dll manifest, but the record actually written to the Application log on the test device was ID 3602 with that identical text. Match on provider plus message text, not on the ID alone, and verify any ID you intend to alert on against your own build before you ship the rule.

Log files

The gatherer writes a crawl trail. The location is read from the registry rather than hard-coded.

HKLM\SOFTWARE\Microsoft\Windows Search\Gather\Windows\SystemIndex
  StreamLogsDirectory = C:\ProgramData\Microsoft\Search\Data\Applications\Windows\GatherLogs
  LogDirectory      = C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Projects\SystemIndex

Inside GatherLogs\SystemIndex you get a numbered series of SystemIndex.N.Crwl files, one per crawl. They are binary-ish but readable enough with Select-String. A healthy crawl log is small, often only a couple of bytes, because nothing failed. A file that is kilobytes long is recording per-item failures, and the strings inside name the paths that failed. That is your list of unreachable locations.

Services, dependencies and the scheduled task

One service, one task. Both were read live from a Windows 11 device.

ItemExpected state
Service short name WSearch, display name Windows SearchRunning. Microsoft documents the startup type as Automatic (Delayed Start), which is a DelayedAutostart value of 1 alongside an Auto start mode.
Service dependenciesRPCSS and BrokerInfrastructure. Observed. If either is broken, WSearch cannot start and the index is a red herring.
Scheduled task \Microsoft\Windows\Shell\IndexerAutomaticMaintenanceReady. It launches a COM handler rather than an executable, so there is no command line to inspect.
Optional feature SearchEngine-Client-PackageEnabled. Readable with Get-WindowsOptionalFeature. If it is Disabled the indexer component is simply not installed.

Roaming profiles, network locations and multi-session

Two realities catch people out here.

First, the index is local by design. Microsoft's archived "Indexer data location" policy documentation states plainly that the directory "must be location on a local fixed drive". You cannot point the catalog at a network share or a redirected profile path. If your profile solution redirects %ProgramData%, indexing will not work.

Second, on multi-session Windows and modern Windows Server, Windows Search now roams per user by itself. Microsoft's FSLogix documentation says the FSLogix search roaming feature "is no longer necessary in newer versions of Windows", specifically Windows Server 2019 version 1809 and later plus Windows 10 and 11 multi-session, and that FSLogix detects native per-user search and disables its own roaming automatically. The recommendation there is to disable FSLogix search roaming and instead enable the Windows Search service so per-user catalogs are created inside the user's container. The registry value that turns on Windows per-user catalogs, named in that same article, is EnablePerUserCatalog under the Windows Search key.

Defender and antivirus: what is actually documented

There is a widespread belief that you should add antivirus exclusions for the index database. Check that claim before you act on it. Microsoft's enterprise virus-scanning recommendation article, KB822158, lists exclusions for Windows Update, security databases, Group Policy, user profiles, Active Directory, DFSR, DHCP, DNS, WINS and Hyper-V. Windows Search and the index database are not in it. Defender's own guidance states that "Adding antivirus exclusions should always be the last resort if no other option is feasible."

What Microsoft does document about antivirus and Search is different and more useful. The performance troubleshooting article warns that "Some anti-virus programs and 'Optimize your PC' applications disable the Windows Search service" and tells you to check the service state after running them. That is the real-world antivirus interaction: not scanning overhead, but a third-party product stopping WSearch outright and leaving your users with no search at all.

Tip. Before you open a ticket with your antivirus vendor about index performance, check the file attributes on the catalog. On the test device Windows.db carried the NotContentIndexed attribute, so Windows already excludes the index from indexing itself. If the file also carries Compressed, someone has enabled NTFS compression on that folder, and you are paying CPU on every single index write. That is a real, fixable performance cause that has nothing to do with your antivirus.

How to verify: the ordered diagnostic path

Work these in order. Each step is cheap, read-only, and rules out a whole class of cause. Do not skip to the end.

Step 1: is the service even running?

This costs five seconds and closes a surprising number of tickets. The command below reads the service state and the authoritative start mode from the service control database.

PowerShell - run elevated
# Service state, start mode, dependencies, and the host process. Get-Service WSearch | Format-List Name,DisplayName,Status,ServicesDependedOn Get-CimInstance Win32_Service -Filter "Name='WSearch'" | Select-Object StartMode,StartName,PathName Get-Process SearchIndexer -ErrorAction SilentlyContinue | Select-Object Name,Id Status : Running ServicesDependedOn : {RPCSS, BrokerInfrastructure} StartMode : Auto StartName : LocalSystem PathName : C:\WINDOWS\system32\SearchIndexer.exe /Embedding # Healthy: Status Running, StartMode Auto, and SearchIndexer.exe present. # Broken shape 1: Status Stopped or StartMode Disabled. A tuning tool or # antivirus did this. Fix the service. Do NOT rebuild. # Broken shape 2: Running but no SearchIndexer process. The host died and # the SCM has not noticed yet. Look for event 7042 next.

Step 2: is the location the user is searching actually in scope?

This is the step almost everybody skips, and it is the step that resolves most silent-miss tickets. There are two ways to answer it: the interface, and a direct query against the index.

The interface path is here.

SettingsPrivacy & securitySearching WindowsAdvanced indexing optionsModify

Microsoft's guidance for the "Indexing complete" state says exactly this: if files are still missing, "make sure that the correct folders are selected to search", and points you at Modify to see the indexed locations. Take that literally.

The better answer is to ask the index itself. Windows Search exposes a read-only OLE DB provider, Search.CollatorDSO, that you can query with SQL from PowerShell without installing anything. This is the single most useful diagnostic in this whole post.

PowerShell - query the index, read-only
# Ask the index directly whether it holds anything under a given folder. # Note the SCOPE syntax: file: prefix, forward slashes, no trailing slash. $conn = New-Object -ComObject ADODB.Connection $conn.Open("Provider=Search.CollatorDSO;Extended Properties='Application=Windows'") $rs = $conn.Execute("SELECT TOP 5 System.ItemPathDisplay FROM SystemIndex WHERE SCOPE='file:C:/Users'") while (-not $rs.EOF) { $rs.Fields.Item(0).Value; $rs.MoveNext() } $rs.Close(); $conn.Close() C:\Users C:\Users\USER\Documents C:\Users\USER\Documents\Reports # Healthy: rows come back. The index is alive and that path is in scope. # Zero rows for a path the user can browse: that path is OUT OF SCOPE. # A rebuild will produce the same zero rows. Fix the scope instead. # A COM error opening the provider: the catalog is not serving queries. # NOW you are in genuine database territory.
Tip: this one query separates the two worlds. If the provider opens and returns rows for some paths but not the one the user cares about, the database is fine and you have a scope problem. If the provider will not open at all, or returns nothing anywhere, you have a database problem. No other single test draws that line so cleanly.

Step 3: is policy excluding it?

If the path is out of scope, find out who put it out of scope. Read the policy key and look for scope rules stamped as policy-sourced.

PowerShell - run elevated
# Every Windows Search policy value applied to this device. $k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' if (Test-Path $k) { Get-ItemProperty $k } else { 'No Windows Search policy applied.' } # Then find scope rules that came from policy rather than from the user. $s = 'HKLM:\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules' Get-ChildItem $s | ForEach-Object { $p = Get-ItemProperty $_.PSPath if ($p.Policy -eq 1) { '{0} Include={1}' -f $p.URL, $p.Include } } # Healthy: the policy key is absent, or holds only settings you deployed. # Broken: a rule prints with Include=0 and Policy=1. Policy is preventing # that path and the user physically cannot add it back. Change the GPO or # the Intune policy. Rebuilding is pointless.

Step 4: what does the event log actually say?

Now, and only now, go to the Application log. You are looking for one thing: does the log say the data is damaged, or does it say something else?

Event Viewer — Application
Level    Source                        Event ID  Task category
Error    Microsoft-Windows-Search  7042      Gatherer
      "The Windows Search Service is being stopped because there is a
       problem with the indexer: Recovery phase failed. Context:
       Application, SystemIndex Catalog"

Warning  Microsoft-Windows-Search  10024     Filter Host
      "The filter host process NNNNN did not respond and is being
       forcibly terminated."

Read that panel the way a triage engineer should. The 7042 with "Recovery phase failed" is a genuine data problem. The 10024 is not: it is a filter handler hanging, and a rebuild will just hang on the same file type again. Two entries, two completely different fixes, in the same log.

Step 5: size, and whether size is even the issue

Microsoft gives you real numbers here. On a typical user's machine the indexer holds fewer than 30,000 items; a power user might reach 300,000; past 400,000 you may start to see performance problems; and the hard ceiling is about 1 million items, beyond which "it may fail or cause resource problems". The index is generally about 10 percent of the size of the indexed content. Check the live count in Settings under Searching Windows, next to Indexed.

Gotcha: the Search performance counters are registered but may have no live instances. On the test device the counter sets Search Indexer, Search Gatherer and Search Gatherer Projects all listed correctly, yet Get-Counter against any of their paths returned "The specified object was not found on the computer." Events 3006, 3007 and 7064 exist precisely to report that the counters failed to load. Do not build a monitoring dashboard on these counters without confirming they return data on your build.

Step 6: run the companion script

The script for this post, Get-SearchIndexHealth.ps1, does every read above in one pass and prints a verdict of REBUILD-INDICATED, SCOPE-OR-POLICY, SERVICE-PROBLEM, CAPACITY or HEALTHY. It is strictly read-only. It never rebuilds, resets, stops the service or deletes the database, and it exits 1 if any read failed rather than showing you a clean report built on missing data. It needs no modules.

The fix: scope, policy, capacity, and rebuild last

Fixing scope with Group Policy

The Windows Search settings live in one place in the policy editor. Here is the full click path.

gpedit.mscComputer ConfigurationAdministrative TemplatesWindows ComponentsSearch

To change which paths are excluded:

  1. Open the Group Policy Management Console and edit the GPO that targets your devices.
  2. Expand Computer Configuration, then Policies, then Administrative Templates.
  3. Expand Windows Components and select Search.
  4. Open Prevent indexing certain paths. This is the forced exclusion that users cannot override.
  5. If it is Enabled, read the path list. The format is a URL, for example file:///C:\* for a local path or otfs://{*}/server/path/* for a network share. The asterisk means "everything below", not a wildcard for string matching.
  6. Remove any path that covers a location your users legitimately need to search, or set the policy to Not Configured if it was applied by mistake.
  7. If you need to guarantee a path is indexed instead, use Default indexed paths, which sets a default the user may still override.
  8. Close the editor and run gpupdate /target:computer /force on a test device.

Two more settings in the same node matter for scope and are worth knowing by name: Prevent indexing of certain file types, which takes a semicolon-delimited extension list, and Allow indexing of encrypted files. Microsoft warns explicitly about the second one: "When this setting is enabled or disabled, the index is rebuilt completely." Toggling it fleet-wide triggers exactly the multi-hour rebuild this post is telling you to avoid, on every targeted device at once.

Do not flip "Allow indexing of encrypted files" during business hours. Microsoft documents that changing it forces a complete index rebuild. Microsoft also documents that if you enable it, full volume encryption such as BitLocker must be used for the index location, because decrypted content is written into the catalog in the clear. Pilot it, schedule it, and check BitLocker status first.

Fixing scope with Intune

Here is the honest state of play, and it is not symmetrical with Group Policy.

intune.microsoft.comDevicesManage devicesConfigurationCreateNew policy
  1. Sign in to the Microsoft Intune admin center with at least the Policy and Profile Manager role.
  2. Select Devices, then Manage devices, then Configuration, then Create, then New policy.
  3. Set Platform to Windows 10 and later and Profile type to Settings catalog. Select Create.
  4. Name the profile something you will recognise later, for example Win11: Windows Search indexing. Select Next.
  5. On Configuration settings choose Add settings, then in the settings picker search for Search and select the Search category.
  6. Pick the settings you need. Close the picker, set each value, and select Next.
  7. Assign scope tags if you use them, assign the profile to a device group, review, and select Create.

These are the Search settings the Policy CSP actually exposes, with the Group Policy name each one maps to. All of them write to SOFTWARE\Policies\Microsoft\Windows\Windows Search and come from Search.admx.

CSP settingGroup Policy friendly nameNote
AllowIndexingEncryptedStoresOrItemsAllow indexing of encrypted filesForces a full rebuild when changed. Default 0.
DisableRemovableDriveIndexingDo not allow locations on removable drives to be added to librariesAlso blocks indexing of those locations.
PreventIndexingLowDiskSpaceMBStop indexing in the event of limited hard drive spaceDefault 1.
PreventRemoteQueriesPrevent clients from querying the index remotelyDefault 1. Blocks remote index use over shares.
DisableBackoffDisable indexer backoffIndexes at full speed regardless of system load. Use with care.
AllowUsingDiacriticsAllow use of diacriticsDefault 0.
AlwaysUseAutoLangDetectionAlways use automatic language detection when indexing content and propertiesRaises memory use. Default 0.
AllowCloudSearchAllow Cloud SearchControls OneDrive and SharePoint results. Default 1.
DoNotUseWebResultsDon't search the web or display web results in SearchEnterprise, Education and IoT editions only. Registry value name is ConnectedSearchUseWeb.
AllowSearchHighlightsAllow search highlightsRegistry value name is EnableDynamicContentInWSB.
DisableSearchFully disable Search UIWindows 11 22H2 and later.
ConfigureSearchOnTaskbarModeConfigures search on the taskbarWindows 11 24H2 and later.
AllowFindMyFilesFind My FilesControls searching secondary drives and outside the user profile.
The path exclusion settings are Group Policy only. There is no CSP node for them. Look carefully at that table: Prevent indexing certain paths, Default indexed paths, Default excluded paths, Prevent indexing of certain file types and Indexer data location are all documented Group Policy settings with no matching Search Policy CSP node. In a cloud-only Intune estate you cannot configure them from the Settings catalog. Your options are ADMX ingestion through the Policy CSP, or a custom OMA-URI, and both need testing. Do not assume a Settings catalog policy is covering your path exclusions, because it is not.

Moving the index to another volume

This is the correct fix when the index is large but legitimate and the system volume is tight. There is both an interface path and a policy.

SettingsPrivacy & securitySearching WindowsAdvanced indexing optionsAdvancedIndex location
  1. Open Settings, then Privacy & security, then Searching Windows.
  2. Select Advanced indexing options to open the Indexing Options dialog.
  3. Select Advanced. You will be prompted for administrative consent.
  4. Under Index location, note the current location, then select Select new and pick a folder on a local fixed drive.
  5. Confirm. The service restarts and moves the catalog files. Watch for event 1017 on success or 1016 on failure.
  6. To enforce it centrally instead, use the Group Policy setting Indexer data location in the same Search node. The archived policy documentation states the directory "must be location on a local fixed drive".

Event 1016 has a documented cause worth memorising: the move fails "because the target directory is not empty, or because the SYSTEM account doesn't have write access to the target directory". Both are trivially checkable before you start.

Reclaiming space without a rebuild, on Windows 10

Microsoft publishes an offline defragmentation procedure that reclaims empty space inside the database instead of rebuilding it. It is worth knowing, and it is worth knowing its limit.

Command Prompt - administrator - WINDOWS 10 ONLY
# Microsoft's documented offline defrag of the ESE index database. Sc config wsearch start=disabled Net stop wsearch EsentUtl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb Sc config wsearch start=delayed-auto Net start wsearch # This targets Windows.edb, an ESE database. Windows 11 ships Windows.db, # which is not an ESE database. Running EsentUtl against it is not a # documented operation and should not be attempted. # Note this procedure DOES stop the service. The companion script does not.
Do not run EsentUtl against Windows.db on Windows 11. Microsoft's defragmentation guidance is written for Windows.edb in Windows 8, 8.1 and 10. Windows 11 uses a different catalog file and Microsoft publishes no equivalent offline maintenance command for it. Pointing an ESE utility at a non-ESE database is how you turn a large index into a destroyed one, and that turns an optional rebuild into a mandatory one.

When a rebuild is genuinely the right call

Rebuild when the log says the data is damaged. That means events 4138, 7040, 3602 or 7042 with a recovery failure context, or the documented state where the Searching Windows page is entirely greyed out with no status message, which Microsoft describes as corrupted indexer registry keys or database.

The documented rebuild path is the Rebuild button, reached here:

SettingsPrivacy & securitySearching WindowsAdvanced indexing optionsAdvancedRebuild

Before you press it, do three things. Reduce the scope first, so you rebuild less; a rebuild of the same oversized scope produces the same oversized index. Plug the device in and leave it on, because the indexer throttles on battery and when the user is active. Set the expectation with the user in hours, not minutes: Microsoft's own number is up to 24 hours.

If search is broken in ways that go beyond the index, Microsoft also documents a supported reset path that is gentler than a manual rebuild: the Search and Indexing troubleshooter, invoked as msdt.exe -ep WindowsHelp id SearchDiagnostic, and a downloadable ResetWindowsSearchBox.ps1 script. The reset article notes that resetting "doesn't affect your files. However, it may temporarily affect the relevance of search results."

Proof it worked: a real run on a real device

The output below is a genuine run of Get-SearchIndexHealth.ps1 on a Windows 11 24H2 device, elevated, with a 30-day event window. The host name has been redacted and nothing else has been altered.

PowerShell - real run, identifiers redacted
PS> .\Get-SearchIndexHealth.ps1 -Days 30 -IncludeIndexQuery Get-SearchIndexHealth - read-only Windows Search index report Host: CONTOSO-1234 Elevated: True Lookback: 30 days == Windows Search service ======================================== Short name: WSearch Display name: Windows Search Status: Running Depends on: RPCSS, BrokerInfrastructure Start type: Auto (Delayed Start) Runs as: LocalSystem Image path: C:\WINDOWS\system32\SearchIndexer.exe /Embedding == Index database ================================================ Catalog directory: C:\ProgramData\Microsoft\Search\Data\Applications\Windows Database file: Windows.db Engine: Windows 11 style catalog (Windows.db) Logical size: 3.35 GB Size on disk: 3.35 GB Attributes: Archive, NotContentIndexed Volume: C: NTFS Free space: 414.00 GB == Crawl scope rules ============================================= Working set rules: 60 include rules: 9 exclude rules: 51 from Group Policy: 0 Built-in default rules: 24 == Group Policy / MDM values ===================================== AllowCortana: 0 == Scheduled task and OS component =============================== \Microsoft\Windows\Shell\IndexerAutomaticMaintenance: Ready SearchEngine-Client-Package: Enabled == Search events in the Application log (last 30 days) =========== ID 10024 Warning x79 DATE The filter host process NNNNN did not respond and is being forcibly terminated. ID 7042 Error x4 DATE The Windows Search Service is being stopped because there is a problem with the indexer: Recovery phase failed. Context: Application, SystemIndex... ID 3602 Error x4 DATE Error ID 1 happened in Windows Search recovery stage, please restart the service. If this error persists, please recreate the index... == Verdict ======================================================= REBUILD-INDICATED Corruption or index-load failures are logged. This is the case where a rebuild is the correct action. This script changed nothing. It did not rebuild, reset, stop or delete anything. # Read the verdict against the evidence, not on faith. Nine include rules and # 51 exclude rules is a normal default profile. Zero policy rules means nobody # excluded anything centrally. 7042 plus 3602 is genuine recovery failure, so # here REBUILD-INDICATED is correct - and it is correct because the LOG says so.

Notice how much of the report is negative evidence, and how valuable that is. There are no policy-sourced scope rules, so no Group Policy is hiding anyone's folders. There is 414 GB free, so this is not the documented low-disk stop. The database carries NotContentIndexed and not Compressed, so it is neither indexing itself nor paying compression overhead. Every one of those checks is a cause you have now ruled out before touching anything.

The same device also answered a direct read-only query against the catalog, which is the proof that the index is serving requests rather than merely existing on disk.

PowerShell - real query output, paths redacted
== Read-only index query (Search.CollatorDSO) ==================== Rows returned: 5 item: C:\ProgramData\Microsoft\Windows\Start Menu item: C:\Users item: C:\Users\USER\AppData\Local\Packages item: C:\Users\USER\AppData\Local\Packages\PKG item: C:\Users\USER\AppData\Local\Packages\PKG\LocalState # Healthy: the provider opened and the catalog returned rows. Whatever else # is wrong here, the query path from tquery.dll to the database works. # Compare with a query scoped to the folder the USER is complaining about. # Rows here but zero rows there is the definition of a scope problem.

One more piece of proof, and it is the one that most often ends the argument. Earlier, a Windows 10 era check for Windows.edb on this machine returned nothing at all, because the file genuinely does not exist. The catalog is Windows.db, 3.35 GB, last written minutes before the run. If your monitoring is still looking for the old name, it is reporting healthy Windows 11 devices as having no index, and it is reporting broken ones the same way.

References

No community or MVP deep-dive on this specific topic verified as both reachable and genuinely on-subject at the time of writing, so no community reference table is included here. Everything above is either a Microsoft-official citation or explicitly labelled as read from a live device.

PowerShell — companion script

Download it from Imran76Awan/Windows-11-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.

Get-SearchIndexHealth.ps1 — Read-only health report for the Windows Search index. Tells you whether a
View all scripts on GitHub
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Windows 11
The firewall flipped to Public and broke everything: Network…
Being domain-joined does not earn you the Domain firewall profile. Windows only grants…
Windows 11
Reliability Monitor: the built-in view that answers "what…
Reliability Monitor puts crashes, bugchecks, driver installs and update installs on one…
Windows 11
Attack Surface Reduction rules broke a line-of-business app:…
An ASR rule in Block mode kills an app and tells you nothing but a GUID. Here is the…