Answers for "powershell copy contents of keyvault to another keyvault"

0

powershell copy contents of keyvault to another keyvault

Param(
    [Parameter(Mandatory)]
    [string]$sourceVaultName,
    [Parameter(Mandatory)]
    [string]$destVaultName
)

Connect-AzAccount

$secretNames = (Get-AzKeyVaultSecret -VaultName $sourceVaultName).Name
$secretNames.foreach{
    Set-AzKeyVaultSecret -VaultName $destVaultName -Name $_ `
        -SecretValue (Get-AzKeyVaultSecret -VaultName $sourceVaultName -Name $_).SecretValue
}
Posted by: Guest on October-13-2020

Code answers related to "powershell copy contents of keyvault to another keyvault"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language