Azure / Azure/azure-powershell
Get-AzSqlDatabase -ExpandKeyList doesn't seem to work
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description
When I run the command
`(Get-AzSqlDatabase -ServerName MyServer -DatabaseName MyDatabase -ResourceGroupName MyResourceGroup -ExpandKeyList).EncryptionProtector`
TDE is enabled on the database to Customer-managed keys, And I can see it enabled via the portal, but can not see it when I run the command these are blank
Identity :
EncryptionProtector :
Keys :
### Issue script & Debug output
```PowerShell
No Error
these have no value
Identity :
EncryptionProtector :
Keys :
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
PS C:\> Get-Module Az*
ModuleType Version PreRelease Name
---------- ------- ---------- ----
Script 2.12.1 Az.Accounts
Script 4.5.0 Az.Sql
PS C:\> Get-InstalledModule AZ
Version Name Repository
------- ---- ----------
9.6.0 Az PSGallery
```
### Error output
```PowerShell
No Error, Does not show the return info like in example 4 from
https://learn.microsoft.com/en-us/powershell/module/az.sql/get-azsqldatabase?view=azps-9.6.0
```
Contributor guide
Research direction
Start by reproducing Get-AzSqlDatabase -ExpandKeyList with the reported Az.Sql 4.5.0 and customer-managed TDE setup, then compare its output with example 4 in the linked documentation. Trace how the cmdlet returns EncryptionProtector, Identity, and Keys; done means these fields are populated consistently for the reported database scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cloud, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100