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 2016 - 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
Required:True
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Location

Specifies the location of a recovery point.

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

Indicates that the search is recursive.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
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
Parameter Sets:FilesFolders, MailboxByAlias, MailboxByDisplayName, WssSite, WssDocuments, ClientVolumes
Required:True
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SearchString

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

Type:String
Required:True
Position:5
Default value:None
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
Parameter Sets:startsWith, contains, endsWith, exactMatch
Required:True
Position:4
Default value:None
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
Required:True
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

SearchOption