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

# New-UDLink

New-UDLink erstellt eine gestaltete Hyperlink-Komponente in PowerShell Universal und formatiert Anker-Elemente mit Theme-Farben, Typografie, Klick-Events und Downloads.

### Übersicht

Mit der Link-Komponente können Sie Anker-Elemente ganz einfach mit Ihren Theme-Farben und Typografie-Stilen anpassen.

### Syntax

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

### Beschreibung

Mit der Link-Komponente können Sie Anker-Elemente ganz einfach mit Ihren Theme-Farben und Typografie-Stilen anpassen.

### Parameter

#### -Id

Die ID der Komponente. Standardmäßig eine zufällige GUID.

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

#### -Url

Die URL des Links.

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

#### -Underline

Ob der Link unterstrichen werden soll.

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

#### -Style

Ein benutzerdefinierter Stil, der auf den Link angewendet wird.

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

#### -Variant

Die Theme-Variante, die auf den Link angewendet wird.

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

#### -ClassName

Die CSS-Klasse, die auf den Link angewendet wird.

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

#### -OpenInNewWindow

Öffnet den Link in einem neuen Fenster.

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

#### -Children

Die zu verlinkenden Komponenten.

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

#### -Text

Text, der in den Link aufgenommen werden soll.

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

#### -OnClick

Ein Skriptblock, der beim Klicken aufgerufen wird.

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

#### -Download

Fügt diesem Link das download-Attribut hinzu.

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

#### Allgemeine Parameter

Dieses Cmdlet unterstützt die allgemeinen Parameter: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable und OutVariable. Weitere Informationen finden Sie unter [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Ausgaben

### Beispiele

#### Beispiel 1: Einfacher Link

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

Ein einfacher Link zu Google.

#### Beispiel 2: Link in neuem Fenster

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

Ein Link zu Google, der in einem neuen Fenster geöffnet wird.

#### Beispiel 3: Download-Link

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

Ein Link, der eine Datei herunterlädt.

#### Beispiel 4: Stil

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

Ein Link mit einem benutzerdefinierten Stil.

#### Beispiel 5: Variante

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

Ein Link mit einer Header-Variante von 1.

#### Beispiel 6: Unterstreichung

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

Ein Link mit einer Unterstreichung beim Überfahren mit der Maus.

#### Beispiel 7: Inhalt

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

Ein Link mit einem Bild als Inhalt.

#### Beispiel 8: OnClick

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

Ein Link mit einem onclick-Event.


---

# 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/de/powershell-befehle/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.
