New-DPMSearchOption
Creates an object that specifies search options for recoverable objects.
Syntax
Default (Default)
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.
Parameter properties
Type: | DateTime |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Location
Specifies the location of a recovery point.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Recursive
Indicates that the search is recursive.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SearchDetail
Specifies the type of object to search for.
The acceptable values for this parameter are:
- FileFolders
- MailboxByAlias
- MailboxByDisplayName
- WssSite
- WssDocuments
Parameter properties
Type: | SearchForDetail |
Default value: | None |
Accepted values: | FilesFolders, MailboxByAlias, MailboxByDisplayName, WssSite, WssDocuments, ClientVolumes |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 3 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SearchString
Specifies a string to search for in the target recovery points.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 5 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SearchType
Specifies the type of comparison for the search.
The acceptable values for this parameter are:
- startsWith
- contains
- endsWith
- exactMatch
Parameter properties
Type: | SearchFilterType |
Default value: | None |
Accepted values: | startsWith, contains, endsWith, exactMatch |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 4 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ToRecoveryPoint
Specifies a date time object. This is the last date of the search range.
Parameter properties
Type: | DateTime |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.