This script will enumerate through all Web applications in your farm and list all content databases attached to them. The output format is either csv or xml. In the output file you will get the following values but can easily be modifed to include more.
- Database name
- Database GUID
- Current site count
- Warning site count
- Maximum site count
- Read only status
- Database server
The solution takes one optional parameter and if omitted xml will be used.
Enum-SPContentDatabases.ps1 [-OutPutFormat xml | csv ]
Mattias Karlsson