Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers  Aliases  Modules
 

Backup-AzureKeyVaultKey

Backup-AzureKeyVaultKey

AzureRM.KeyVault

Synopsis

Backs up a key in a key vault.

Syntax

Backup-AzureKeyVaultKey [-VaultName] [-Name] [-OutputFile] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Backup-AzureKeyVaultKey cmdlet backs up a specified key in a key vault by downloading it and storing it in a file. If there are multiple versions of the key, all versions are included in the backup. Because the downloaded content is encrypted, it cannot be used outside of Azure Key Vault. You can restore a backed-up key to any key vault in the subscription that it was backed up from.

Typical reasons to use this cmdlet are:

-- You want to escrow a copy of your key, so that you have an offline copy in case you accidentally delete your key in your key vault.

-- You created a key using Key Vault and now want to clone the key into a different Azure region, so that you can use it from all instances of your distributed application. Use the Backup-AzureKeyVaultKey cmdlet to retrieve the key in encrypted format and then use the Restore-AzureKeyVaultKey cmdlet and specify a key vault in the second region.

Parameters

-Name <String>

Aliases

KeyName

Required?

true

Position

2

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-OutputFile <String>

Aliases

none

Required?

false

Position

3

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-VaultName <String>

Aliases

none

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Aliases

cf

Required?

false

Position

named

Default value

False

Accept pipeline input?

False

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Aliases

wi

Required?

false

Position

named

Default value

False

Accept pipeline input?

False

Accept wildcard characters?

false

Input Type

Return Type

Notes

Examples

Example 1: Back up a key with an automatically generated file name

This command retrieves the key named MyKey from the key vault named MyKeyVault and saves a backup of that key to a file that is automatically named for you, and displays the file name.

PS C:\>Backup-AzureKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyKey'

Example 2: Back up a key to a specified file name

This command retrieves the key named MyKey from the key vaultnamed MyKeyVault and saves a backup of that key to a file named Backup.blob.

PS C:\>Backup-AzureKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyKey' -OutputFile 'C:\Backup.blob'

Online Version
Add-AzureKeyVaultKey
Get-AzureKeyVaultKey
Remove-AzureKeyVaultKey
Restore-AzureKeyVaultKey