> 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/server/da/knowledge-base/how-to-articles/create-a-devolutions-server-workspace-with-an-application-key.md).

# Opret et Devolutions Server-arbejdsområde med en programnøgle

Opret et Devolutions Server-arbejdsområde med en programnøgle og en hemmelighed, enten via Remote Desktop Manager eller et PowerShell-script.

Med modulet Devolutions.PowerShell er det muligt at oprette forbindelse til en Devolutions Server-instans ved hjælp af en [***programnøgle og programhemmelighed***](/server/da/web-interface/administration/user-and-security-management/applications-identities.md). De kan oprette et Devolutions Server-arbejdsområde i Remote Desktop Manager eller manuelt med PowerShell. Følg den metode, der passer bedst til Deres behov.

#### Metode 1: Remote Desktop Manager

1. I Remote Desktop Manager skal De gå til ***Filer – Arbejdsområder***.
2. Klik på knappen ***Tilføj et nyt arbejdsområde***.
3. I det næste vindue skal De vælge teamarbejdsområdet ***Devolutions Server*** og derefter klikke på ***OK***.
4. På fanen ***Generelt*** skal De angive et ***Navn***, en ***Vært*** og et ***Brugernavn*** til det nye arbejdsområde. De kan derefter klikke på knappen ***Test forbindelse*** for at bekræfte, at forbindelsen virker.
5. Klik på fanen ***PowerShell***.
6. Angiv [***programnøgle og programhemmelighed***](/server/da/web-interface/administration/user-and-security-management/applications-identities.md) i feltet ***Lejer-id*** og feltet ***Adgangskode***, og klik derefter på ***OK***.

Det nye Devolutions Server-arbejdsområde er nu oprettet. De kan nu oprette forbindelse til Devolutions Server og køre Deres scripts.

#### Metode 2: PowerShell

1. Indsæt følgende eksempelscript ved hjælp af PowerShell-cmdletterne:

   ```powershell
   $dsname = "DVLS PowerShell"
   $dsurl = "https<area>://your_dvls_url"
   $appkey = "your_appkey"
   $appsecret = "your_appsecret"

   $ds = New-RDMDataSource -DVLS -Name $dsname -Server $dsurl -ScriptingTenantID $appkey -ScriptingApplicationPassword $appsecret -SetDatasource -WarningAction SilentlyContinue
   Set-RDMDataSource $ds
   Set-RDMCurrentDataSource $ds
   ```
2. Erstat variabelværdierne med Deres egne, og kør derefter scriptet.

Det nye Devolutions Server-arbejdsområde er nu oprettet. De kan nu oprette forbindelse til Devolutions Server og køre Deres scripts.


---

# 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/server/da/knowledge-base/how-to-articles/create-a-devolutions-server-workspace-with-an-application-key.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.
