Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.
This repository was archived by the owner on Jun 22, 2026. It is now read-only.

Azure Key Vault policy requirements #245

Description

@pejuborg

Question about Azure Key Vault secrets

When I try to create a new secret in an Azure Key Vault using Set-Secret I don't know how to provide information about values that are enforced by Azure Policy.

When using the Set-AzKeyVaultSecret cmdlet from Az.KeyVault all works fine.

I have to run it like this
Set-AzKeyVaultSecret -VaultName vault -Name "test" -Expires ((get-date).AddDays(88)) -SecretValue (ConvertTo-SecureString "xxx" -AsPlainText -Force) -ContentType 'txt'

Is it possible to do this with Set-Secret or should Set-AzKeyVaultSecret be used?

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions