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
#Somewhat stolen from PowerZure Get-AzureKeyVaultContent and Show-AzureKeyVaultContent , thanks hausec! | |
#reimplemented by Flangvik to run in a single "Azure PowerShell" Agent job, inside an DevOps Pipeline | |
#Suppress warnings for clean output | |
Set-Item Env:\SuppressAzurePowerShellBreakingChangeWarnings "true" | |
#Get all Azure KeyVaults from currently selected/scoped subscription | |
#This connection is known as an "Service connection",and in terms of accessing Azure resources, uses either Service principal or Managed identity | |
$vaults = Get-AzKeyVault |