Skip to content

Instantly share code, notes, and snippets.

@amit-g
Created January 20, 2023 02:39
Show Gist options
  • Save amit-g/b6a745da6394e86ae58333169f0e4bf2 to your computer and use it in GitHub Desktop.
Save amit-g/b6a745da6394e86ae58333169f0e4bf2 to your computer and use it in GitHub Desktop.
Data entry function for creating key vault secret
$KeyValultName = "YourKeyVaultName"
function Set-MyAzKeyVaultSecret($SecretName)
{
$SecretValue = Read-Host -Prompt "Please enter the secret value for $SecretName" -AsSecureString
Set-AzKeyVaultSecret -VaultName $KeyValultName -Name $SecretName -SecretValue $SecretValue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment