Created
December 28, 2019 16:16
-
-
Save dmpe/a0ca981883a4b7d28ed658f5f58da398 to your computer and use it in GitHub Desktop.
Azure Key Vault - Backup secrets using powershell (core) - Uses newer az Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[string]$VaultName = 'keyvault' | |
Get-AzKeyVaultSecret -VaultName $VaultName | | |
ForEach-Object { | |
Backup-AzKeyVaultSecret ` | |
-VaultName $VaultName ` | |
-Name $_."Name" ` | |
-OutputFile ('/home/jm/Documents/azure-keyvault-backups/{0}.blob' -f $_."Name") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment