Condividi tramite


New-DPMSearchOption

New-DPMSearchOption

Creates an object that specifies search options for recoverable objects.

Syntax

Parameter Set: Default
New-DPMSearchOption [-FromRecoveryPoint] <DateTime> [-ToRecoveryPoint] <DateTime> [-SearchDetail] <SearchParameters+SearchForDetail> {FilesFolders | MailboxByAlias | MailboxByDisplayName | WssSite | WssDocuments | ClientVolumes} [-SearchType] <SearchParameters+SearchFilterType> {startsWith | contains | endsWith | exactMatch} [-SearchString] <String> [-Location <String> ] [-Recursive] [ <CommonParameters>]

Detailed Description

The New-DPMSearchOption cmdlet creates an object that specifies search options for recoverable objects that System Center 2012 – Data Protection Manager (DPM) manages. You can specify a search string, a range of recovery points to search, the type of object to search for, and also a location and whether to search recursively.

Use the Get-DPMRecoverableItem cmdlet to perform a search.

Parameters

-FromRecoveryPoint<DateTime>

Specifies a date time object. This is the first date of the search range.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Location<String>

Specifies the location of a recovery point.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Recursive

Indicates that the search is recursive.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SearchDetail<SearchParameters+SearchForDetail>

Specifies the type of object to search for. Valid values are:

-- FileFolders
-- MailboxByAlias
-- MailboxByDisplayName
-- WssSite
-- WssDocuments

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SearchString<String>

Specifies a string to search for in the target recovery points.

Aliases

none

Required?

true

Position?

5

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SearchType<SearchParameters+SearchFilterType>

Specifies the type of comparison for the search. Valid vales are:

-- startsWith
-- contains
-- endsWith
-- exactMatch

Aliases

none

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ToRecoveryPoint<DateTime>

Specifies a date time object. This is the last date of the search range.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

Outputs

The output type is the type of the objects that the cmdlet emits.

  • SearchOption

Examples

Example 1: Create a search option

This command creates a search option object for recovery points between September 15, 2009 and September 28, 2009. The object specifies searches for files and folders that contain the string tobe in the location D:\. The command specifies the search as recursive. Therefore, the search also checks files and folders in folders in the D:\ drive.

PS C:\> New-DPMSearchOption -FromRecoveryPoint "15 September 2009" -ToRecoveryPoint "28 September 2009" -SearchDetail FileFolders -SearchType contains -Recursive -SearchString "tobe" -Location "D:\" 

Get-DPMRecoverableItem