> 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/it/comandi-powershell/new-udlink.md).

# New-UDLink

New-UDLink crea un componente hyperlink con tema in PowerShell Universal, applicando agli elementi anchor colori del tema, tipografia, eventi di clic e download.

### Sinossi

Il componente Link consente di personalizzare facilmente gli elementi anchor con i colori e gli stili tipografici del suo tema.

### Sintassi

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

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

### Descrizione

Il componente Link consente di personalizzare facilmente gli elementi anchor con i colori e gli stili tipografici del suo tema.

### Parametri

#### -Id

L'ID del componente. Il valore predefinito è un GUID casuale.

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

#### -Url

L'URL del link.

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

#### -Underline

Se sottolineare il link.

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

#### -Style

Uno stile personalizzato da applicare al link.

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

#### -Variant

La variante del tema da applicare al link.

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

#### -ClassName

La classe CSS da applicare al link.

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

#### -OpenInNewWindow

Apre il link in una nuova finestra.

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

#### -Children

I componenti da collegare.

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

#### -Text

Testo da includere nel link.

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

#### -OnClick

Un blocco di script da invocare al clic.

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

#### -Download

Aggiunge l'attributo download a questo link.

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

#### Parametri comuni

Questo cmdlet supporta i parametri comuni: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable e OutVariable. Per maggiori informazioni, veda [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Output

### Esempi

#### Esempio 1: link di base

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

Un link di base a Google.

#### Esempio 2: link in una nuova finestra

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

Un link a Google che si apre in una nuova finestra.

#### Esempio 3: link di download

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

Un link che scarica un file.

#### Esempio 4: stile

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

Un link con uno stile personalizzato.

#### Esempio 5: variante

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

Un link con una variante header di 1.

#### Esempio 6: sottolineatura

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

Un link con sottolineatura al passaggio del mouse.

#### Esempio 7: contenuto

```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 link con un'immagine come contenuto.

#### Esempio 8: OnClick

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

Un link 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 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-universal/it/comandi-powershell/new-udlink.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.
