New-SearchOption

New-SearchOption

Builds an object with the search options to search for a particular string within the set of specified recovery points.

Syntax

New-SearchOption [-ToRecoveryPoint] <DateTime> [-SearchString] <String> [-SearchType] <SearchFilterType> [-SearchDetail] <SearchForDetail> [-FromRecoveryPoint] <DateTime> [-Location <String>] [-Recursive <SwitchParameter>] [<CommonParameters>]

Detailed Description

The New-SearchOption builds an object with the search options to search for a particular string within the set of specified recovery points.

Use this object within the Get-RecoverableItem to perform the actual search.

Parameters

-ToRecoveryPoint

Indicates the last date of the range within which to search the recovery points.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

1

-SearchString

The string to search for.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

4

-SearchType

Indicates the type of comparison to be used for the search. The valid values are: startsWith, contains, endsWith and exactMatch.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

3

-SearchDetail

Indicates what type of object to search for. The valid values are: FilesFolders, MailboxByAlias, MailboxByDisplayName, WssSite, and WssDocuments.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

2

-FromRecoveryPoint

Indicates the first date of the range within which to search the recovery points.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

0

-Location

The location of the recovery point.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Recursive

Indicates whether the search should be recursive. If this parameter is not used, search will be performed at only one level.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Notes

  • For more information, type "Get-Help New-SearchOption -detailed".
    For technical information, type "Get-Help New-SearchOption -full".

    Additionally, any updated information about the cmdlet will be available at http://go.microsoft.com/fwlink/?LinkId=95130.

Examples

EXAMPLE 1

New-SearchOption -FromRecoveryPoint "11 September 2009" -ToRecoveryPoint "28 September 2009" -SearchDetail filesfolders -SearchType contains -Recursive -SearchString tobe -Location "d:\"

This command searches for string "tobe" and returns the recovery points between 11 September 2009 and 28 September 2009 that contain the string.