> 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/get-started.md).

# Kom i gang

Kom godt i gang med PowerShell Universal ved at installere serveren, logge på og oprette Deres første API-slutpunkt, script og app.

## Installér PowerShell Universal

De skal installere PowerShell Universal-serveren. [Der er mange måder at gøre det på,](/powershell-universal/da/getting-started.md) men De kan bruge kommandolinjen nedenfor til at komme hurtigt i gang:

{% tabs %}
{% tab title="Windows" %}
De kan installere PowerShell Universal som en tjeneste. Sørg for, at PowerShell kører som administrator, ellers installeres tjenesten ikke korrekt.

{% code collapsedlinecount="10" %}

```powershell
Install-Module Devolutions.PowerShellUniversal
Install-PSUServer
```

{% endcode %}
{% endtab %}

{% tab title="Linux" %}
De kan installere PowerShell Universal ved hjælp af følgende shellscript:

{% code collapsedlinecount="10" %}

```powershell
Install-Module Devolutions.PowerShellUniversal
Install-PSUServer
```

{% endcode %}
{% endtab %}

{% tab title="Mac OS X" %}
De kan installere PowerShell Universal ved hjælp af Universal PowerShell-modulet:

{% code collapsedlinecount="10" %}

```powershell
Install-Module Devolutions.PowerShellUniversal
Install-PSUServer -AddToPath
Start-PSUServer -Port 5000
```

{% endcode %}
{% endtab %}

{% tab title="Raspberry PI OS" %}
{% code collapsedlinecount="10" %}

```
wget https://cdn.devolutions.net/download/Devolutions.PowerShellUniversal.linux-arm.2026.3.0.0.zip
unzip Devolutions.PowerShellUniversal.linux-arm.2026.3.0.0.zip -d ./PSU
chmod +x ./PSU/Universal.Server
./PSU/Universal.Server

```

{% endcode %}
{% endtab %}
{% endtabs %}

## Åbn PowerShell Universal

Som standard kører PowerShell Universal på port 5000 på localhost. Åbn en webbrowser, og gå til `http://localhost:5000`.

### Log på med en Devolutions Account

Første gang De navigerer til PowerShell Universal, kan De logge på med en [Devolutions Account](https://docs.devolutions.net/portal/profile/create-your-devolutions-account) for at modtage en gratis udviklerlicens. Denne licens vil aktivere alle funktioner og er beregnet til ikke-produktionsarbejdsflow.

Dette Developer License-flow er beregnet til lokal udvikling og kræver lokal adgang til PowerShell Universal-værten. Hvis brugere kun tilgår PSU fra fjernbrowsere via Docker, IIS eller en omvendt proxy, bør de bruge en af standardlicensstierne i stedet.

### Guide ved første kørsel

De kan valgfrit vælge at køre guiden ved første kørsel i stedet for at logge på med en Devolutions Account og angive en licensnøgle.

## Opret en API

API'er giver Dem mulighed for at kalde PowerShell-scripts via HTTP. Gå til Build > APIs > Endpoints, og vælg Create Endpoint. Angiv en URL, deaktiver Authentication, og vælg Save.

Vælg det nye slutpunkt for at åbne dets editor, og angiv derefter følgende kommando:

{% code collapsedlinecount="10" %}

```powershell
Get-ComputerInfo
```

{% endcode %}

Gem scriptet, og klik derefter på knappen Execute for at teste det.

De kan også udføre API'en via `Invoke-RestMethod`.

{% code collapsedlinecount="10" %}

```powershell
PS C:\Users\adamr> Invoke-RestMethod http://localhost:5000/hello-world

WindowsBuildLabEx                                       : 22000.1.amd64fre.co_release.210604-1628
WindowsCurrentVersion                                   : 6.3
WindowsEditionId                                        : Professional
WindowsInstallationType                                 : Client
WindowsInstallDateFromRegistry                          : 8/6/2021 4:05:12 PM
WindowsProductId                                        : 00330-52452-93139-AAOEM
WindowsProductName                                      : Windows 10 Pro
WindowsRegisteredOrganization                           :
```

{% endcode %}

## Opret et script

For at oprette et script skal De navigere til Build > Scripts og vælge Create Script. Angiv et navn, og vælg Save. PowerShell Universal åbner scripteditoren.

Indtast følgende script i editoren, og gem:

{% code collapsedlinecount="10" %}

```powershell
Read-Host "What should I say?"

1..100 | ForEach-Object {
    Write-Progress -PercentComplete $_ -Activity "Processing..."
}

Get-Service
```

{% endcode %}

Når scriptet er gemt, klik på Run.

## Opret en app

For at oprette en ny PowerShell-baseret brugergrænseflade skal De gå til Build > Apps og vælge Create App. Angiv et navn og en URL til appen.

Vælg Save, og vælg derefter appnavnet for at åbne dens editor. Erstat det genererede script med følgende:

{% code collapsedlinecount="10" %}

```powershell
New-UDApp -Title "Hello, World!" -Content {
    New-UDButton -Text "Click Me" -OnClick {
        Show-UDToast -Message 'Success!!'
    }
}
```

{% endcode %}

Gem appen, vælg Restart, og vælg derefter View App. I appen skal De vælge Click Me.

Få mere at vide om de forskellige funktioner i PowerShell Universal:

* [API'er](/powershell-universal/da/api/about.md)
* [Automatisering](/powershell-universal/da/automatisering/about.md)
* [Apps](/powershell-universal/da/apps/building-dashboards.md)

### Se også

* [Devolutions Academy – Installation](https://academy.devolutions.net/student/activity/3465938-installation)


---

# 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/get-started.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.
