Search-DSEntry
2025-02-17
Search-DSEntry
SYNOPSIS
Search an entry in the DVLS instance
SYNTAX
InputObject (Default)
Search-DSEntry [[-InputObject] <MultiVaultSearchItemData[]>] [-ExcludeVault <guid[]>]
[-IncludeVault <guid[]>] [-IncludePAMVaults] [-IncludeUserVault] [-AsLegacyResponse]
[<CommonParameters>]
Search
Search-DSEntry [-By] <SearchItemType> -Value <string> [-Match <SearchItemText>]
[-ExcludeVault <guid[]>] [-IncludeVault <guid[]>] [-IncludePAMVaults] [-IncludeUserVault]
[-AsLegacyResponse] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Search an entry in the DVLS instance. There are two way to execute a search. This cmdlet allows a simple search with a single criterion using three parameters: By, Match, and Value. For a more complex search or ease of use, criteria can be created with the cmdlet New-DSSearchCriteria. The InputObject will accept an array of those criteria. By default, all vaults are searched, except the User vault and the PAM vaults. For those two vaults, each will be included by using the corresponding parameter: IncludeUserVault and IncludePAMVaults. It is also possible to search only a subset of vaults by using one of IncludeVault and ExcludeVault.
EXAMPLES
EXAMPLE 1
PS C:> Search-DSEntry -By Name -Match ExactExpression -Value 'SomeValue' -IncludeVault @($pamVaultAID, $pamVaultBID)
Search in the two vaults identified by the IDs stored in $pamvaultAID and $pamVaultBID for an entry whose name named 'SomeValue'
EXAMPLE 2
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 3
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.
EXAMPLE 4
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
-AsLegacyResponse
In versions prior to 2024.2, many DS cmdlets returned a ServerResponse object. Enabling this backward compatibility switch allows scripts developed for earlier versions to function correctly.
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: ''
-By
Field on which the expression will be applied
Type: Devolutions.RemoteDesktopManager.SearchItemType
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: Search
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ExcludeVault
Vaults to be excluded from the search.
Type: System.Guid[]
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludePAMVaults
Include the PAM Vaults
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: ''
-IncludeUserVault
Include the user vault
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: ''
-IncludeVault
Vaults to be searched. If not specified, all of them will be searched except the PAM Vaults and User vault. For the PAM vaults or User vault, use the corresponding switch.
Type: System.Guid[]
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-InputObject
Search criteria created from New-DSSearchCriteria
Type: Devolutions.RemoteDesktopManager.Business.MultiVaultSearchItemData[]
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: InputObject
Position: 1
IsRequired: false
ValueFromPipeline: true
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: Search
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Value
String value
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: Search
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
Devolutions.RemoteDesktopManager.Business.MultiVaultSearchItemData
Array of criteria created by New-DSSearchCriteria calls.
OUTPUTS
RemoteDesktopManager.PowerShellModule.Private.MultipleDataServerResponse`1[[System.Management.Automation.PSObject, System.Management.Automation, Version=7.4.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
NOTES
For more information, type "Get-Help Search-DSEntry -detailed". For technical information, type "Get-Help Search-DSEntry -full".