azure-powershell
azure-powershell copied to clipboard
Get-AzSqlDatabase where do I find the PausedDate Like in the CLI command az sql db list
Description
##NOTE: Missing PuasedDate $AzSQLServer=(Get-AzSqlServer); $AzSQLDatabases=($AzSQLServer|Get-AzSqlDatabase);
I can see the status that the database is paused but can not find the date in Get-AzSqlDatabase output
CLI: has the PuasedDate! $query = '[].{ResourceGroup:resourceGroup, Location:location, DBName:name , SKUCapacity:sku.capacity , SKUName:sku.name , SKUSize:sku.size , SKUTier:sku.tier , Status:status, Type:type , PausedDate:pausedDate}' $Results = (az sql db list --ids $(az sql server list --query [].id --output tsv) --query $query --output json | convertfrom-json)
Script or Debug output
No error
Environment data
Name Value
---- -----
PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
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
PS C:\Program Files\7-Zip> Get-Module Az*
ModuleType Version Name
---------- ------- ----
Script 2.9.1 Az.Accounts
Script 4.6.1 Az.KeyVault
Script 3.0.1 Az.Monitor
Script 0.1.0 Az.MonitoringSolutions
Script 3.1.0 Az.OperationalInsights
Script 6.1.0 Az.Resources
Script 3.11.0 Az.Sql
Script 4.8.0 Az.Storage
Script 1.5.0 Az.Synapse
Error output
No error just trying to locate the pauseddate from Powershel AZ.sql Get-AzSqlDatabase
Thank you for your feedback. This has been routed to the support team for assistance.
@lostsole We are looking into it and get back to you for any additional information.
@lostsole PausedDate is currently not exposed through Get-AzSqlDatabase
cmdlet. I will provide your feedback internally so that it can be taken care of in upcoming releases of the Powershell module.
@lostsole I have submitted a PR to included PausedDate and ResumeDate as Get-AzSqlDatabase output. We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.