Share via


New-DPMSearchOption

Creates an object that specifies search options for recoverable objects.

Syntax

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

Description

The New-DPMSearchOption cmdlet creates an object that specifies search options for recoverable objects that System Center - 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.

Examples

Example 1: Create a search option

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

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 to be 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.

Parameters

-FromRecoveryPoint

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

Type:DateTime
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Location

Specifies the ___location of a recovery point.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Recursive

Indicates that the search is recursive.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SearchDetail

Specifies the type of object to search for.

The acceptable values for this parameter are:

  • FileFolders
  • MailboxByAlias
  • MailboxByDisplayName
  • WssSite
  • WssDocuments
Type:SearchForDetail
Accepted values:FilesFolders, MailboxByAlias, MailboxByDisplayName, WssSite, WssDocuments, ClientVolumes
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SearchString

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

Type:String
Position:5
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SearchType

Specifies the type of comparison for the search.

The acceptable values for this parameter are:

  • startsWith
  • contains
  • endsWith
  • exactMatch
Type:SearchFilterType
Accepted values:startsWith, contains, endsWith, exactMatch
Position:4
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ToRecoveryPoint

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

Type:DateTime
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Outputs

SearchOption