Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/20e433002d73a69e2b7ef9318d9b4b9b to your computer and use it in GitHub Desktop.
Save PlagueHO/20e433002d73a69e2b7ef9318d9b4b9b to your computer and use it in GitHub Desktop.
Update an Azure Key Vault Secret with additional parameters
Set-AzureKeyVaultSecret -VaultName $keyVaultName -Name 'MyAdminPassword' `
-SecretValue (ConvertTo-SecureString -String 'Sup3rS3cr3tP4ss!' -AsPlainText -Force) `
-ContentType 'txt' `
-NotBefore ((Get-Date).ToUniversalTime()) `
-Expires ((Get-Date).AddYears(2).ToUniversalTime()) `
-Disable:$false `
-Tags @{ 'Risk' = 'High'; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment