> 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/powershell-commands/set-psusecretvault.md).

# Set-PSUSecretVault

Update a model-backed Azure Key Vault registration in PowerShell Universal.

## SYNOPSIS

Updates a model-backed secret vault registration.

## SYNTAX

```powershell
Set-PSUSecretVault -Id <Int64> [<VaultOptions>] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUSecretVault -Name <String> [<VaultOptions>] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUSecretVault -Vault <Vault> [<VaultOptions>] [<ConnectionOptions>] [<CommonParameters>]
```

`<VaultOptions>`: `[-NewName <String>] [-Type <String>] [-Description <String>] [-VaultUri <String>] [-AuthenticationType <VaultAuthenticationType>] [-TenantId <String>] [-ClientId <String>] [-ClientSecretVariable <String>] [-ManagedIdentityClientId <String>]`. `<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`.

## DESCRIPTION

Updates a vault registration by numeric ID, name, or vault object from the pipeline. Only supplied properties change. `-Name` selects the existing vault; use `-NewName` to rename it (an empty new name is rejected). Configure the vault URI and authentication settings without writing client secret values into vault configuration: supply the name of a PSU secret variable instead.

## EXAMPLES

```powershell
Set-PSUSecretVault -Name 'Production Key Vault' `
    -VaultUri 'https://prod2.vault.azure.net/'

Get-PSUSecretVault -Name 'Production Key Vault' |
    Set-PSUSecretVault -AuthenticationType ManagedIdentity `
        -ManagedIdentityClientId '11111111-1111-1111-1111-111111111111'
```

## PARAMETERS

| Parameter                  | Description                                                            |
| -------------------------- | ---------------------------------------------------------------------- |
| `-Id`                      | Numeric registration ID.                                               |
| `-Name`                    | Existing registration name (not the new name).                         |
| `-Vault`                   | Vault object; accepts pipeline input.                                  |
| `-NewName`                 | New nonempty registration name.                                        |
| `-Type`                    | Vault provider type (Azure Key Vault uses `AzureKeyVault`).            |
| `-Description`             | New registration description.                                          |
| `-VaultUri`                | New Azure Key Vault URI.                                               |
| `-AuthenticationType`      | Authentication mode: `Default`, `ManagedIdentity`, or `ClientSecret`.  |
| `-TenantId`                | Entra ID tenant ID for client-secret authentication.                   |
| `-ClientId`                | Entra ID application client ID for client-secret authentication.       |
| `-ClientSecretVariable`    | Name of the PSU secret variable holding the application client secret. |
| `-ManagedIdentityClientId` | Client ID for a user-assigned managed identity.                        |
| `-ComputerName`            | PSU Management API URL or host name (alias `-Uri`).                    |
| `-AppToken`                | Management API app token.                                              |
| `-Credential`              | Management API credentials.                                            |
| `-UseDefaultCredentials`   | Uses current Windows credentials.                                      |
| `-Integrated`              | Uses the in-process management client.                                 |
| `-TrustCertificate`        | Ignores certificate validation errors.                                 |
| `-Cookies`                 | Reuses session authentication cookies.                                 |

## OUTPUTS

`PowerShellUniversal.Vault`.

## RELATED LINKS

[Get-PSUSecretVault](/powershell-universal/powershell-commands/get-psusecretvault.md) · [New-PSUSecretVault](/powershell-universal/powershell-commands/new-psusecretvault.md) · [Remove-PSUSecretVault](/powershell-universal/powershell-commands/remove-psusecretvault.md)

## PERMISSIONS

The access token requires `platform.vaults/update` to run this cmdlet remotely.


---

# 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/powershell-commands/set-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.
