New-DSSearchCriteria
2025-01-30
New-DSSearchCriteria
SYNOPSIS
Create a search criterion to be used in the Search-DSEntry
SYNTAX
__AllParameterSets
New-DSSearchCriteria [-By] <SearchItemType> -Value <string> [-Match <SearchItemText>]
[-CaseSensitive] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
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.
EXAMPLES
EXAMPLE 1
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.
EXAMPLE 2
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.
PARAMETERS
-By
Field on which the expression will be applied
Type: Devolutions.RemoteDesktopManager.SearchItemType
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-CaseSensitive
Case sensitive search
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Match
Condition the expression must respect. By default, the condition is 'Contains'.
Type: Devolutions.RemoteDesktopManager.SearchItemText
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Value
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
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
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.
INPUTS
OUTPUTS
Devolutions.RemoteDesktopManager.Business.MultiVaultSearchItemData
NOTES
For more information, type "Get-Help New-DSSearchCriteria -detailed". For technical information, type "Get-Help New-DSSearchCriteria -full".