I'm working through some automation scripts and attempting to identify Elastic Pools that have been defined, but are empty (no databases).
Using Get-AzSqlElasticPool
, I can grab the name of the pool and its associated properties.
Capacity
and DatabaseCapacityMax
are initially both set to 50 in my lab after it is provisioned. Since there is no property that reflects the current count, my expectation was that I would have to compare Capacity
and DatabaseCapacityMax
.
To get the info I'm running this command:
Get-AzSqlElasticPool -ResourceGroupName $resourcegroupname -ServerName myServer.ServerName | Select-Object -Property ElasticPoolName, Capacity, DatabaseCapacityMax
I then provisioned databases in the Elastic Pool, none of the capacity properties changed. The documentation on the MSFT docs website seems to be lacking for any of the properties and I've been unable to find anything useful. Am I missing something, has anyone else had any luck determining the number of databases associated with the elastic pool?