Microsoft personal vault10/5/2023 ![]() ![]() This command gets all the secrets that have been previously deleted, but not purged, in the key vault named Contoso. Get-AzKeyVaultSecret -VaultName 'Contoso' -InRemovedState Example 6: Get all the secrets that have been deleted but not purged for this key vault. not providing -Name, the -AsPlainText is ignored. ![]() The cmdlet returns the secret as a string when -AsPlainText is applied. Example 5: Get the plain text value of the current version of a specific secret $secretText = Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'ITSecret' -AsPlainText This command gets a specific version of the secret named secret1 in the key vault named Contoso. Example 4: Get a specific version of a specific secret Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1' -Version '5d1a74ba2c454439886fb8509b6cab3c' This command gets the current version of the secret named secret1 in the key vault named Contoso. ![]() Example 3: Get the current version of a specific secret Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1' This command gets all versions of the secret named secret1 in the key vault named Contoso. Example 2: Get all versions of a specific secret Get-AzKeyVaultSecret -VaultName 'Contoso' -Name 'secret1' -IncludeVersions This command gets the current versions of all secrets in the key vault named Contoso. Examples Example 1: Get all current versions of all secrets in a key vault Get-AzKeyVaultSecret -VaultName 'Contoso' This cmdlet gets a specific secret or all the secrets in a key vault. ![]() The Get-AzKeyVaultSecret cmdlet gets secrets in a key vault. In this article Syntax Get-Az Key Vault Secret ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |