Which PowerShell cmdlet retrieves a secret value from Key Vault as plain text?
- A Get-AzKeyVaultSecret -VaultName -Name | Select-Object -ExpandProperty SecretValue | ConvertFrom-SecureString -AsPlainText (correct answer)
- B Get-AzKeyVaultSecretValue
- C Get-Secret
- D az keyvault secret show --query value
Shortcut: Get-AzKeyVaultSecret returns the secret as a PSKeyVaultSecret with SecretValue as a SecureString. Password for plain text.
Get-AzKeyVaultSecret returns the secret as a PSKeyVaultSecret with SecretValue as a SecureString. Convert with ConvertFrom-SecureString -AsPlainText (PowerShell 7+) or NetworkCredential.Password for plain text.