Create a search criterion to be used in the Search-DSEntry
New-DSSearchCriteria [-By] <SearchItemType> -Value <string> [-Match <SearchItemText>]
[-CaseSensitive] [<CommonParameters>]
Create a search criterion to be used in the Search-DSEntry. The vaults to be searched are determined in the Search-DSEntry cmdlet. A criterion is determined at two fields: By, to indicate the field where the seach will be applied, and Value, the value whose type depend of the field. For a standard string value, the parameter Match indicates how to search is conducted. For date values, to use a custom interval, the value must be set to Custom and specified with the parameters After and Before. Search by ConnectionType or Description will ignore PAM vaults.
PS C:\> New-DSSearchCriteria -By Name -Match StartsWith -Value ThePrefix | Search-DSEntry
Search all entries whose name starts with ThePrefix in all vaults, excluding the User vault and the PAM vaults.
PS C:\> $criteria = @();
$criteria += New-DSSearchCriteria -By Username -Value AUsername;
$criteria += New-DSSearchCriteria -By CreationDate -Value Last30Days;
Search-DSEntry -InputObject $criteria -IncludePamVaults -IncludeVault @()
Search all PAM entries whose username contains AUsername created in the last 30 days. Only the PAM vaults will be searched.
Field on which the expression will be applied
Type: Devolutions.RemoteDesktopManager.SearchItemType
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Case sensitive search
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Condition the expression must respect. By default, the condition is 'Contains'.
Type: Devolutions.RemoteDesktopManager.SearchItemText
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Search date interval for the creation or the last update. For a custom value, use After and Before parameters. By default, it will be set to Last Week.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
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.
For more information, type "Get-Help New-DSSearchCriteria -detailed". For technical information, type "Get-Help New-DSSearchCriteria -full".