< Back

Restore-AzureKeyVaultKey

Tue Jan 29, 2019 9:50 pm

NAME Restore-AzureKeyVaultKey



SYNOPSIS

Creates a key in a key vault from a backed-up key.





SYNTAX

Restore-AzureKeyVaultKey [-InputObject] <PSKeyVault> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>] [-Confirm] [-WhatIf]

[<CommonParameters>]



Restore-AzureKeyVaultKey [-VaultName] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>] [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The Restore-AzureKeyVaultKey cmdlet creates a key in the specified key vault. This key is a replica of the backed-up key in the input file and has

the same name as the original key. If the key vault already has a key by the same name, this cmdlet fails instead of overwriting the original key.

If the backup contains multiple versions of a key, all versions are restored.



The key vault that you restore the key into can be different from the key vault that you backed up the key from. However, the key vault must use

the same subscription and be in an Azure region in the same geography (for example, North America). See the Microsoft Azure Trust Center

(https://azure.microsoft.com/support/trust-center/) for the mapping of Azure regions to geographies.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InputFile <String>

Specifies the input file that contains the backup of the key to restore.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InputObject <PSKeyVault>

KeyVault object



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-VaultName <String>

Specifies the name of the key vault into which to restore the key.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.KeyVault.Models.PSKeyVaultKey







NOTES









Example 1: Restore a backed-up key



PS C:\\>Restore-AzureKeyVaultKey -VaultName 'MyKeyVault' -InputFile "C:\\Backup.blob"



This command restores a key, including all of its versions, from the backup file named Backup.blob into the key vault named MyKeyVault.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... eyvaultkey

Add-AzureKeyVaultKey

Backup-AzureKeyVaultKey

Get-AzureKeyVaultKey

Remove-AzureKeyVaultKey