> 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-universal/es/comandos-de-powershell/new-udlink.md).

# New-UDLink

New-UDLink crea un componente de hipervínculo con tema en PowerShell Universal, aplicando estilo a los elementos ancla con colores del tema, tipografía, eventos de clic y descargas.

### Sinopsis

El componente Link le permite personalizar fácilmente los elementos ancla con los colores y los estilos tipográficos de su tema.

### Sintaxis

```powershell
New-UDLink [-Id <String>] [-Url <String>] [-Underline <String>] [-Style <Hashtable>] [-Variant <String>] [-ClassName <String>] [-OpenInNewWindow] [-Text <String>] [-OnClick <Endpoint>] [-Download] [-Aria <ScriptBlock>] [<CommonParameters>]

New-UDLink [-Id <String>] [-Url <String>] [-Underline <String>] [-Style <Hashtable>] [-Variant <String>] [-ClassName <String>] [-OpenInNewWindow] [-Children <ScriptBlock>] [-OnClick <Endpoint>] [-Download] [-Aria <ScriptBlock>] [<CommonParameters>]
```

### Descripción

El componente Link le permite personalizar fácilmente los elementos ancla con los colores y los estilos tipográficos de su tema.

### Parámetros

#### -Id

El ID del componente. De forma predeterminada es un GUID aleatorio.

```
Required?                    false
Position?                    named
Default value                ([Guid]::NewGuid()).ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Url

La URL del enlace.

```
Required?                    false
Position?                    named
Default value                https://devolutions.net/powershell-universal/
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Underline

Si se subraya el enlace.

```
Required?                    false
Position?                    named
Default value                none
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Style

Un estilo personalizado que aplicar al enlace.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Variant

La variante de tema que aplicar al enlace.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

La clase CSS que aplicar al enlace.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OpenInNewWindow

Abre el enlace en una nueva ventana.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Children

Los componentes que enlazar.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Text

Texto que incluir en el enlace.

```
Required?                    false
Position?                    named
Default value                Ironman Software
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -OnClick

Un bloque de script que invocar al hacer clic.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Download

Añade el atributo download a este enlace.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Aria

Un bloque de script de llamadas a `New-UDAriaAttribute` que suministra atributos ARIA o de rol para el enlace.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Parámetros comunes

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

### Salidas

### Ejemplos

#### Ejemplo 1: enlace básico

```powershell
New-UDLink -Url "https://www.google.com" -Text "Google" -Id 'link1'
```

Un enlace básico a Google.

#### Ejemplo 2: enlace en una nueva ventana

```powershell
New-UDLink -Url "https://www.google.com" -Text "Google" -OpenInNewWindow -Id 'link2'
```

Un enlace a Google que se abre en una nueva ventana.

#### Ejemplo 3: enlace de descarga

```powershell
New-UDLink -Url "https://cdnweb.devolutions.net/web/common/logos/powershell-universal-logo.svg" -Text "Download" -OpenInNewWindow -Download -Id 'link3'
```

Un enlace que descarga un fichero.

#### Ejemplo 4: estilo

```powershell
New-UDLink -Url "https://www.google.com" -Text "Google" -Style @{ 'color' = 'red' } -Id 'link4'
```

Un enlace con un estilo personalizado.

#### Ejemplo 5: variante

```powershell
New-UDLink -Url "https://www.google.com" -Text "Google" -Variant "h1" -Id 'link5'
```

Un enlace con una variante de encabezado 1.

#### Ejemplo 6: subrayado

```powershell
New-UDLink -Url "https://www.google.com" -Text "Google" -Underline "hover" -Id 'link6'
```

Un enlace con subrayado al pasar el cursor.

#### Ejemplo 7: contenido

```powershell
New-UDLink -Url "https://www.google.com" -Content {
    New-UDImage -Url "https://cdnweb.devolutions.net/web/common/logos/powershell-universal-logo.svg" -Height 20 -Width 20
} -Id 'link7'
```

Un enlace con una imagen como contenido.

#### Ejemplo 8: OnClick

```powershell
New-UDLink -Text "Click" -OnClick {
    Show-UDToast -Message "Clicked!"
} -Id 'link8'
```

Un enlace con un evento onclick.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/es/comandos-de-powershell/new-udlink.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
