> 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/cloud/da/web-interface/help-and-tools/export/powershell-script-export-type.md).

# Eksporttype for PowerShell-script

Brug et PowerShell-script til at eksportere data fra Devolutions Cloud til JSON eller CSV ved at udfylde legitimationsoplysningerne til programidentiteten automatisk eller manuelt.

Brug et PowerShell-script til at eksportere data i JSON- eller CSV-format. Metoden er kun tilgængelig med Devolutions Cloud og kræver PowerShell 7 eller nyere.

Vælg først, om oplysningerne i PowerShell-scriptet skal udfyldes automatisk eller manuelt.

### Udfyld oplysningerne automatisk

1. Klik på ***Eksportér*** under ***Hjælp og værktøjer***.
2. Vælg eksporttypen ***PowerShell-script***.
3. Opret derefter en [programidentitet](/cloud/da/web-interface/administration/management/application-identities/manage-application-identities.md) med ret til at eksportere de ønskede bokse (se [Roller og tilladelser](/cloud/da/web-interface/administration/configuration-and-security/system-permissions/roles-and-permissions.md) for at få flere oplysninger). Aktivér kun ***Kan få adgang til brugerbokse*** for at medtage alle brugerbokse i eksporten. Se [Eksportér en enkelt boks med PowerShell](/cloud/da/knowledge-base/how-to-articles/export-a-single-vault-with-powershell.md) for at eksportere en enkelt boks.
4. Vælg indstillingen ***Automatisk***.
5. Angiv programidentitetens ***Programhemmelighed*** og ***Programnøgle*** i de tilsvarende felter.
6. Angiv ***Sti til destinationsmappe***. Det er her, dataene eksporteres.
7. Vælg at eksportere i JSON eller CSV.
8. Klik på ***Download***.
9. Kør det downloadede script med PowerShell 7.

Dataene er eksporteret til destinationsmappen.

### Udfyld oplysningerne manuelt

1. Klik på ***Eksportér*** under ***Hjælp og værktøjer***.
2. Vælg eksporttypen ***PowerShell-script***.
3. [Opret en programidentitet](/cloud/da/web-interface/administration/management/application-identities.md), og tildel den rollen ***Boksejere*** eller en brugerdefineret rolle, der indeholder tilladelsen ***Eksportér***, for den ønskede boks.
4. Vælg indstillingen ***Manuel***.
5. Vælg at eksportere i JSON eller CSV.
6. Kopiér og indsæt scriptet i en PowerShell-fil (.ps1).
7. Ret variablerne i det kopierede script med de relevante oplysninger. Se tabellen nedenfor.

   <table><thead><tr><th width="211.79998779296875">Variabel</th><th>Beskrivelse</th></tr></thead><tbody><tr><td><code>$url</code></td><td>Angiv URL-adressen til Devolutions Cloud. Variablen er udfyldt automatisk, men den kan stadig ændres.</td></tr><tr><td><code>$appSecret</code></td><td>Angiv programbrugerens <em><strong>Programhemmelighed</strong></em>.</td></tr><tr><td><code>$appKey</code></td><td>Angiv programbrugerens <em><strong>Programnøgle</strong></em>.</td></tr><tr><td><code>$pathToExportedFolder</code></td><td>Angiv <em><strong>Sti til destinationsmappe</strong></em>. Det er her, dataene eksporteres.</td></tr></tbody></table>
8. Kør scriptet med PowerShell 7.

Dataene er eksporteret til destinationsmappen.


---

# 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/cloud/da/web-interface/help-and-tools/export/powershell-script-export-type.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.
