Update-SearchCatalog
Reindexes a search catalog either completely or partially.
Syntax
Update-SearchCatalog
[-All]
[-Catalog <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-SearchCatalog
-RootPath <String[]>
[-Catalog <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-SearchCatalog
[-Path] <String[]>
[-Catalog <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-SearchCatalog
reindexes a search catalog either completely or partially.
Examples
Example 1: Reindex an entire catalog
Update-SearchCatalog -All
This command reindexes the entire default Windows Search catalog.
Example 2: Reindex a search root.
Update-SearchCatalog -RootPath file:///C:\
This command reindexes the search root drive C:
in the default Windows Search catalog.
For file system search roots, you can omit the file:///
protocol prefix.
Example 3: Reindex matching paths.
Update-SearchCatalog -Path file:///C:\Users\*\Documents\*.docx
This command reindexes all Microsoft Word files in and below the Documents
folder of all users in the default Windows Search catalog.
If the specified path is recognizable as a file system path, you can omit the file:///
protocol prefix.
Parameters
-All
Use this parameter to reindex an entire search catalog.
Note
To use the All parameter, you must run this cmdlet from an elevated PowerShell session. Start PowerShell by using the Run as administrator option.
Type | |
Position |
Named |
Default value |
None |
Accept pipeline input |
False |
Accept wildcard characters |
False |
-Catalog
Specifies the name of the catalog this cmdlet operates on. If omitted, this is the default Windows Search catalog, named SystemIndex.
Type | |
Position |
Named |
Default value |
SystemIndex |
Accept pipeline input |
False |
Accept wildcard characters |
False |
-Path
Use this parameter to specify an URL or path pattern to reindex all matching items.
Type |
string[] |
Position |
0 |
Default value |
None |
Accept pipeline input |
True (ByPropertyName, ByValue) |
Accept wildcard characters |
True |
-RootPath
Use this parameter to specify a search root to be reindexed.
Type |
string[] |
Position |
Named |
Default value |
None |
Accept pipeline input |
True (ByPropertyName) |
Accept wildcard characters |
False |
Inputs
string[]
You can pipe paths to this cmdlet.
Outputs
None
This cmdlet returns no output.
Notes
The difference between Reset-SearchCatalog
and Update-SearchCatalog -All
is that the former removes any old information from the index before reindexing while the latter doesn't.