Add-SearchRoot
Adds search roots to a search catalog.
Syntax
Add-SearchRoot
[-Path] <String[]>
[-Catalog <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-SearchRoot
-InputObject <SearchRootInfo[]>
[-Catalog <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-SearchRoot
cmdlet adds search roots to a search catalog.
Examples
Example 1: Add a search root
Add-SearchRoot -Path file:///D:\
This command adds the drive D:
as a search root to the default Windows Search catalog.
For file system search roots, you can omit the file:///
protocol prefix.
Parameters
-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 |
-InputObject
Specifies SearchRootInfo objects containing search roots with advanced properties to be added to a search catalog.
Type | |
Position |
Named |
Default value |
None |
Accept pipeline input |
True (ByValue) |
Accept wildcard characters |
False |
-Path
Specifies a search root to be added to a search catalog.
Type |
string[] |
Position |
0 |
Default value |
None |
Accept pipeline input |
True (ByValue) |
Accept wildcard characters |
False |
Inputs
string[]
You can pipe paths to this cmdlet.
You can pipe SearchRootInfo objects to this cmdlet.
Outputs
None
This cmdlet returns no output.
Notes
To learn more about search roots, see Managing Search Roots in Microsoft's Windows Search documentation.