List of Content Databases (CDB) and their size and number of sites

A simple one line PowerShell to get a list of all content DBs, their size, and the number of site collections.

# Get All content Databases 
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue;
clear;
Get-SPContentDatabase | Sort-Object Name | Format-Table -AutoSize Name,ID,@{Label="Sites"; Expression={$_.CurrentSiteCount}},@{Label="Size GB"; Expression={[math]::Round(($_.DiskSizeRequired / 1024/1024/1024),2)}},Status

output :