$NewKeyVaultName="<your new key Vault>"
$ExistingKeyVault="<your existing key Valut>"
$secretNames = (Get-AzKeyVaultSecret -VaultName $ExistingKeyVault).Name
$secretNames.foreach{
Set-AzKeyVaultSecret -VaultName $NewKeyVaultName -Name $_ -SecretValue (Get-AzKeyVaultSecret -VaultName $ExistingKeyVault -Name $_).SecretValue
}
No comments:
Post a Comment