> 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/powershell-kommandoer/new-psusecretvault.md).

# New-PSUSecretVault

Opret en modelbaseret registrering af Azure Key Vault til brug med hemmelighedsvariabler og legitimationsoplysninger i PowerShell Universal.

## Synopsis

Opretter en registrering af en hemmelighedsboks.

## Syntaks

```powershell
New-PSUSecretVault -Name <String> -VaultUri <String> [-Type <String>] [-Description <String>] [-AuthenticationType <VaultAuthenticationType>] [-TenantId <String>] [-ClientId <String>] [-ClientSecretVariable <String>] [-ManagedIdentityClientId <String>] [<ConnectionOptions>] [<CommonParameters>]
```

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`.

## Beskrivelse

Opretter en modelbaseret registrering af en hemmelighedsboks i PowerShell Universal. Udbydertypen er som standard `AzureKeyVault`; registreringer af Azure Key Vault håndteres in-process og kan vælges til hemmelighedsvariabler og legitimationsoplysninger. Ved godkendelse med klienthemmelighed angiver `-ClientSecretVariable` en PSU-hemmelighedsvariabel, der indeholder Entra ID-klienthemmeligheden; værdien skrives ikke til bokskonfigurationen.

## Eksempler

```powershell
New-PSUSecretVault -Name 'Production Key Vault' `
    -VaultUri 'https://prod.vault.azure.net/' `
    -AuthenticationType ManagedIdentity

New-PSUSecretVault -Name 'Customer Key Vault' `
    -VaultUri 'https://customer.vault.azure.net/' `
    -AuthenticationType ClientSecret `
    -TenantId '00000000-0000-0000-0000-000000000000' `
    -ClientId '11111111-1111-1111-1111-111111111111' `
    -ClientSecretVariable 'AzureKeyVaultClientSecret'
```

## Parametre

| Parameter                  | Beskrivelse                                                                                           |
| -------------------------- | ----------------------------------------------------------------------------------------------------- |
| `-Name`                    | Påkrævet registreringsnavn for boksen.                                                                |
| `-VaultUri`                | Påkrævet Azure Key Vault-URI.                                                                         |
| `-Type`                    | Boksudbydertype, som standard `AzureKeyVault`.                                                        |
| `-Description`             | Beskrivelse af registreringen.                                                                        |
| `-AuthenticationType`      | Godkendelsestilstand: `Default`, `ManagedIdentity` eller `ClientSecret`.                              |
| `-TenantId`                | Lejer-id for Entra ID til godkendelse med klienthemmelighed.                                          |
| `-ClientId`                | Klient-id for Entra ID-programmet til godkendelse med klienthemmelighed.                              |
| `-ClientSecretVariable`    | Navn på den PSU-variabel, der indeholder programmets klienthemmelighed.                               |
| `-ManagedIdentityClientId` | Klient-id for den brugertildelte administrerede identitet; udelad det for en systemtildelt identitet. |
| `-ComputerName`            | URL eller værtsnavn for PSU Management API (alias `-Uri`).                                            |
| `-AppToken`                | App-token til Management API.                                                                         |
| `-Credential`              | Legitimationsoplysninger til Management API.                                                          |
| `-UseDefaultCredentials`   | Bruger de aktuelle Windows-legitimationsoplysninger.                                                  |
| `-Integrated`              | Bruger den integrerede administrationsklient i processen.                                             |
| `-TrustCertificate`        | Ignorerer fejl ved certifikatvalidering.                                                              |
| `-Cookies`                 | Genbruger sessionscookies til godkendelse.                                                            |

## Output

`PowerShellUniversal.Vault`.

## Relaterede links

[Get-PSUSecretVault](/powershell-universal/da/powershell-kommandoer/get-psusecretvault.md) · [Set-PSUSecretVault](/powershell-universal/da/powershell-kommandoer/set-psusecretvault.md)

## Tilladelser

Adgangstokenet kræver `platform.vaults/create` for at køre denne cmdlet eksternt.


---

# 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/powershell-kommandoer/new-psusecretvault.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.
