New-SearchOption
Builds an object with the search options to search for a particular string within the set of specified recovery points.
New-SearchOption [-ToRecoveryPoint] <DateTime> [-SearchString] <String> [-SearchType] <SearchFilterType> [-SearchDetail] <SearchForDetail> [-FromRecoveryPoint] <DateTime> [-Location <String>] [-Recursive <SwitchParameter>] [<CommonParameters>]
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.
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 |
The string to search for.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
4 |
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 |
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 |
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 |
The location of the recovery point.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
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 |
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.
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.
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 https://go.microsoft.com/fwlink/?LinkId=95130.
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.