> 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/da/apps/components/data-display/icon.md).

# Ikon

Tilføj FontAwesome-ikoner til PowerShell Universal-apps med New-UDIcon, herunder ikonsøgning, størrelse, rotation, rammer og brugerdefinerede CSS-formateringsmuligheder.

[FontAwesome ](https://fontawesome.com/?from=io)ikoner, der skal medtages i Deres app. Ikonnavne er en smule anderledes end dem, der vises på FontAwesome-webstedet. Hvis De f.eks. vil bruge ikonet `network-wired`, skal De bruge følgende streng.

```powershell
New-UDIcon -Icon 'NetworkWired'
```

## Sådan finder De et ikon

Vi inkluderer FontAwesome v6 sammen med PowerShell Universal. De kan bruge `Find-UDIcon` til at søge i listen over inkluderede ikoner.

```powershell
Find-UDIcon User
```

{% hint style="warning" %}
Enummet `UniversalDashboard.FontAwesomeIcons` bør ikke bruges og er kun medtaget af hensyn til bagudkompatibilitet. Mange af ikonerne er ikke længere en del af FontAwesome 6.
{% endhint %}

## Ikon

Opret ikoner ved at angive deres navne. De kan bruge ikonreferencen nedenfor til at finde ikoner.

```powershell
New-UDIcon -Icon 'AddressBook'
```

## Størrelse

Angiv størrelsen på ikonet. Gyldige værdier er: `xs`, `sm`, `lg`, `2x`, `3x`, `4x`, `5x`, `6x`, `7x`, `8x`, `9x`, `10x`

```powershell
    New-UDIcon -Icon 'AddressBook' -Size 'sm'
    New-UDIcon -Icon 'AddressBook' -Size 'lg'
    New-UDIcon -Icon 'AddressBook' -Size '5x'
    New-UDIcon -Icon 'AddressBook' -Size '10x'
```

## Rotation

Rotér ikoner. Værdien repræsenterer rotationsgraderne.

```powershell
New-UDIcon -Icon 'AddressBook' -Size '5x' -Rotation 90
```

## Kant

Tilføj en kant til Deres ikon.

```powershell
New-UDIcon -Icon 'AddressBook' -Size '5x' -Border
```

## Stil

Anvend CSS-typografier på Deres ikon.

```powershell
New-UDIcon -Icon 'AddressBook' -Size '5x' -Style @{
    backgroundColor = "red"
}
```

## Søg visuelt efter ikoner

```powershell
New-UDTextbox -Id 'txtIconSearch' -Label 'Search' 
New-UDButton -Text 'Search' -OnClick {
    Sync-UDElement -Id 'icons'
}

New-UDElement -tag 'p' -Content {}

New-UDDynamic -Id 'icons' -Content {
    $IconSearch = (Get-UDElement -Id 'txtIconSearch').value
    if ($null -ne $IconSearch -and $IconSearch -ne '')
    {
        $Icons =$Icons = Find-UDIcon -Name $IconSearch
    }

    foreach($icon in $icons) {
        try{
            New-UDChip -Label $icon -Icon (New-UDIcon -Icon $icon)
        }
        catch{
            New-UDChip -Label "$icon Unknown" 
        }
    }
}
```

## Komplet ikonliste

[Klik her for at se den komplette ikonliste.](https://gist.github.com/adamdriscoll/8a5d12b0ac5641bc1083bebf921f56fe)

## API

[**New-UDIcon**](/powershell-universal/da/powershell-kommandoer/new-udicon.md)

### Se også

* [Devolutions Academy – Hentning af brugeroplysninger](https://academy.devolutions.net/student/activity/3543018-part-3-fetching-user-details)


---

# 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/da/apps/components/data-display/icon.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.
