[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
How to get the size of all Azure SQL databases

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

How to get the size of all Azure SQL databases.


Date created: April 30, 2020.
 

In this article, we want to show you how you can get the size of all your Azure SQL databases using PowerShell.

Let's make sure your environment is ready for our PowerShell script to run.

First, make sure you have changed the PowerShell execution policy.



Second, make sure you install Azure resource manager module.





Next, install Azure PowerShell module.




 

After you install the Azure PowerShell module, you can import the module by running the following command:






Now you can run below PowerShell script, just make sure you change the resource group name by the resource group where your databases reside.






The Connect-AzureRmAccount cmdlet connects to Azure with an authenticated account for use with Azure Resource Manager cmdlet requests. This cmdlet when executed brings the following screen for authentication purposes.






After providing your user credentials, the output of the script should be similar to our results.







 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.