< Back

Copy-AzFlexKeyVault

Mon Jan 13, 2020 7:11 pm

NAME Copy-AzFlexKeyVault



SYNOPSIS

Copies Secrets and Access Policies from a source KeyVault onto a Destination KeyVault.





SYNTAX

Copy-AzFlexKeyVault [-SourceKeyvaultName] <String> [-SourceResourceGroup] <String> [-DestinationKeyvaultName]

<String> [-DestinationResourceGroup] <String> [<CommonParameters>]





DESCRIPTION

Copies Secrets and Access Policies from a source KeyVault onto a Destination KeyVault.



You need to be in the right subscription where both KeyVaults are located. Both source and destination KeyVault

need to be on the same subscription.

You need to be loged in azure with 'Login-AzAccount' and you need to have LIST and READ rights on secrets on the

target key vault.





PARAMETERS

-SourceKeyvaultName <String>

The name of the source KeyVault.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SourceResourceGroup <String>

The name of the source KeyVault Resource Group.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DestinationKeyvaultName <String>

The name of the destination KeyVault.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DestinationResourceGroup <String>

The name of the destination KeyVault Resource Group.



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Copy-AzFlexKeyVault -SourceKeyvaultName my-source-kv -SourceResourceGroup my-source-kv-rg

-DestinationKeyvaultName my-destination-kv -DestinationResourceGroup my-destination-kv-rg



Copies Secrets and Access Policies from the KeyVault my-source-kv in Resource Group my-source-kv-rg to the

KeyVault my-destination-kv in Resource Group my-destination-kv-rg.











RELATED LINKS