> 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/fr/commandes-powershell/new-udlink.md).

# New-UDLink

New-UDLink crée un composant hyperlien thématisé dans PowerShell Universal, en stylisant les éléments d'ancrage avec les couleurs du thème, la typographie, les événements de clic et les téléchargement

### Synopsis

Le composant Link vous permet de personnaliser facilement les éléments d'ancrage avec les couleurs et les styles typographiques de votre thème.

### Syntaxe

```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>]
```

### Description

Le composant Link vous permet de personnaliser facilement les éléments d'ancrage avec les couleurs et les styles typographiques de votre thème.

### Paramètres

#### -Id

L'ID du composant. Sa valeur par défaut est un GUID aléatoire.

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

#### -Url

L'URL du lien.

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

#### -Underline

Indique s'il faut souligner le lien.

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

#### -Style

Un style personnalisé à appliquer au lien.

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

#### -Variant

La variante de thème à appliquer au lien.

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

#### -ClassName

La classe CSS à appliquer au lien.

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

#### -OpenInNewWindow

Ouvre le lien dans une nouvelle fenêtre.

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

#### -Children

Les composants à lier.

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

#### -Text

Texte à inclure dans le lien.

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

#### -OnClick

Un bloc de script à invoquer lors d'un clic.

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

#### -Download

Ajoute l'attribut download à ce lien.

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

#### -Aria

Un bloc de script d'appels `New-UDAriaAttribute` qui fournit les attributs ARIA ou de rôle du lien.

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

#### Paramètres communs

Cette applet de commande prend en charge les paramètres communs : Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable et OutVariable. Pour plus d'informations, consultez [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Sorties

### Exemples

#### Exemple 1 : Lien de base

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

Un lien de base vers Google.

#### Exemple 2 : Lien dans une nouvelle fenêtre

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

Un lien vers Google qui s'ouvre dans une nouvelle fenêtre.

#### Exemple 3 : Lien de téléchargement

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

Un lien qui télécharge un fichier.

#### Exemple 4 : Style

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

Un lien avec un style personnalisé.

#### Exemple 5 : Variante

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

Un lien avec une variante d'en-tête de 1.

#### Exemple 6 : Soulignement

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

Un lien souligné au survol.

#### Exemple 7 : Contenu

```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 lien avec une image comme contenu.

#### Exemple 8 : OnClick

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

Un lien avec un événement 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/fr/commandes-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.
