Search Results for

    Show / Hide Table of Contents

    Get-SearchRule

    Gets the search rules in effect for a search catalog.

    Syntax

    Get-SearchRule
       [[-Catalog] <String>]
       [<CommonParameters>]
    

    Description

    The Get-SearchRule cmdlet gets the search rules in effect for a search catalog.

    Examples

    Example 1: Get search rules

    Get-SearchRule
    
    Path                                                         RuleType RuleSet         FollowFlags
    ----                                                         -------- -------         -----------
    csc://{S-1-5-21-3419697060-3810377854-678604692-1001}/        Include Default FF_INDEXCOMPLEXURLS
    file:///*\$RECYCLE.BIN\                                       Exclude Default FF_INDEXCOMPLEXURLS
    file:///*\DfsrPrivate\                                        Exclude Default FF_INDEXCOMPLEXURLS
    file:///*\System Volume Information\                          Exclude Default FF_INDEXCOMPLEXURLS
    file:///C:\ProgramData\Microsoft\Windows\Start Menu\          Include Default FF_INDEXCOMPLEXURLS
    file:///C:\Users\                                             Include Default FF_INDEXCOMPLEXURLS
    file:///C:\Users\*\AppData\                                   Exclude Default FF_INDEXCOMPLEXURLS
    file:///C:\Users\Bob\.*\                                      Exclude Default FF_INDEXCOMPLEXURLS
    file:///C:\Users\Bob\Documents\FooData\                       Exclude    User FF_INDEXCOMPLEXURLS
    file:///C:\Users\Bob\Documents\FooData\Common\                Include    User FF_INDEXCOMPLEXURLS
    file:///C:\Windows.*\                                         Exclude Default FF_INDEXCOMPLEXURLS
    file:///C:\Windows\*\temp\                                    Exclude Default FF_INDEXCOMPLEXURLS
    iehistory://{S-1-5-21-3419697060-3810377854-678604692-1001}/  Include Default FF_INDEXCOMPLEXURLS
    winrt://{S-1-5-21-3419697060-3810377854-678604692-1001}/      Include Default FF_INDEXCOMPLEXURLS
    

    This command gets the search rules in effect 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

    Inputs

    None

    You can't pipe objects to this cmdlet.

    Outputs

    SearchRuleInfo

    This cmdlet returns SearchRuleInfo objects.

    Notes

    To learn more about search rules, see Managing Scope Rules in Microsoft's Windows Search documentation.

    Related Links

    • Add-SearchRule

    • Remove-SearchRule

    • Reset-SearchRule

    • Test-SearchRule

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