Search Results for

    Show / Hide Table of Contents

    Get-SearchRoot

    Gets all search roots defined for a search catalog.

    Syntax

    Get-SearchRoot
       [[-Catalog] <String>]
       [-PathOnly]
       [<CommonParameters>]
    

    Description

    The Get-SearchRoot cmdlet gets all search roots defined for a search catalog.

    Examples

    Example 1: Get all search roots paths

    Get-SearchRoot -PathOnly
    
    csc://{S-1-5-21-3419697060-3810377854-678604692-1001}/
    defaultroot://{S-1-5-21-3419697060-3810377854-678604692-1001}/
    file:///C:\
    iehistory://{S-1-5-21-3419697060-3810377854-678604692-1001}/
    winrt://{S-1-5-21-3419697060-3810377854-678604692-1001}/
    

    This command gets the search root paths for the default Windows Search catalog.

    Example 2: Get detailed infos for all search roots paths

    Get-SearchRoot
    
    Path                  : csc://{S-1-5-21-3419697060-3810377854-678604692-1001}/
    IsHierarchical        : True
    ProvidesNotifications : True
    UseNotificationsOnly  : False
    EnumerationDepth      : 4294967295
    HostDepth             : 0
    FollowDirectories     : True
    AuthenticationType    : eAUTH_TYPE_ANONYMOUS
    
    Path                  : defaultroot://{S-1-5-21-3419697060-3810377854-678604692-1001}/
    IsHierarchical        : True
    ... output truncated ...
    

    This command gets the search root details for the default Windows Search catalog.

    Parameters

    -Catalog

    Specifies the name of the catalog this cmdlet operates on. If omitted, this is the default Windows Search catalog, named SystemIndex.

    Type

    string

    Position

    0

    Default value

    SystemIndex

    Accept pipeline input

    False

    Accept wildcard characters

    False

    -PathOnly

    Use this parameter to return only the paths of the search roots, not the details.

    Type

    SwitchParameter

    Position

    Named

    Default value

    None

    Accept pipeline input

    False

    Accept wildcard characters

    False

    Inputs

    None

    You can't pipe objects to this cmdlet.

    Outputs

    SearchRootInfo

    By default, this cmdlet returns SearchRootInfo objects.

    string

    When you use the PathOnly parameter, the cmdlet returns the root paths.

    Notes

    To learn more about search roots, see Managing Search Roots in Microsoft's Windows Search documentation.

    Related Links

    • Add-SearchRoot

    • Remove-SearchRoot

    In this article
    Back to top Copyright © 2023 Matthias Wolf, Mawosoft