11
votes

How can I see all site collections associated in a specific Content db in SharePoint 2010?

Any advice or suggestion is highly appreciated.

3
also sharepoint 2013Aaron
also SharePoint 2016Aaron

3 Answers

22
votes
Get-SPSite -Limit All  -ContentDatabase contentdbname | select url, @{label="Size";Expression={$_.usage.storage}} 
2
votes

This can also be achieved by

get-spsite -limit all | select url,contentdatabase

The output gets you all of your content databases and the site collections contained within. The -limit all would help if you have more than 100 site collections.

1
votes

It's easy, just look in the documentation and here it goes: SPContentDatabase.Sites.