Skip to content

Instantly share code, notes, and snippets.

@dmpe
Created December 28, 2019 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmpe/a0ca981883a4b7d28ed658f5f58da398 to your computer and use it in GitHub Desktop.
Save dmpe/a0ca981883a4b7d28ed658f5f58da398 to your computer and use it in GitHub Desktop.
Azure Key Vault - Backup secrets using powershell (core) - Uses newer az Module
[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