> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/es/powershell-commands/new-dssearchcriteria.md).

# New-DSSearchCriteria

### Sinopsis

Crear un criterio de búsqueda para utilizarlo en Search-DSEntry

### Sintaxis

#### \_\_AllParameterSets

```
New-DSSearchCriteria [-By] <SearchItemType> -Value <string> [-Match <SearchItemText>]
 [-CaseSensitive] [<CommonParameters>]
```

### Descripción

Crear un criterio de búsqueda para utilizarlo en Search-DSEntry. Las bóvedas en las que se buscará se determinan en el cmdlet Search-DSEntry. Un criterio se determina mediante dos campos: By, para indicar el campo en el que se aplicará la búsqueda, y Value, el valor cuyo tipo depende del campo. Para un valor de cadena estándar, el parámetro Match indica cómo se realiza la búsqueda. Para valores de fecha, para utilizar un intervalo personalizado, el valor debe establecerse en Custom y especificarse con los parámetros After y Before. La búsqueda por ConnectionType o Description ignorará las bóvedas PAM.

### Ejemplos

#### Ejemplo 1

```powershell
PS C:\> New-DSSearchCriteria -By Name -Match StartsWith -Value ThePrefix | Search-DSEntry
```

Buscar todas las entradas cuyo nombre empiece por ThePrefix en todas las bóvedas, excluyendo la bóveda de usuario y las bóvedas PAM.

#### Ejemplo 2

```powershell
PS C:\> $criteria = @();
        $criteria += New-DSSearchCriteria -By Username -Value AUsername;
        $criteria += New-DSSearchCriteria -By CreationDate -Value Last30Days;
        Search-DSEntry -InputObject $criteria -IncludePamVaults -IncludeVault @()
```

Buscar todas las entradas PAM cuyo nombre de usuario contenga AUsername creadas en los últimos 30 días. Solo se buscará en las bóvedas PAM.

### Parámetros

#### -By

Campo en el que se aplicará la expresión

```yaml
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: ''
```

#### -CaseSensitive

Búsqueda que distingue entre mayúsculas y minúsculas

```yaml
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: ''
```

#### -Match

Condición que debe respetar la expresión. Por defecto, la condición es 'Contains'.

```yaml
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: ''
```

#### -Value

Intervalo de fechas de búsqueda para la creación o la última actualización. Para un valor personalizado, utilice los parámetros After y Before. Por defecto, se establecerá en Last Week.

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

Este cmdlet admite los parámetros comunes: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction y -WarningVariable. Para más información, consulte [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Notas

Para más información, escriba "Get-Help New-DSSearchCriteria -detailed". Para información técnica, escriba "Get-Help New-DSSearchCriteria -full".


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/es/powershell-commands/new-dssearchcriteria.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
