How to see all site collections in a specific cont

2020-02-26 07:48发布

问题:

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

Any advice or suggestion is highly appreciated.

回答1:

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


回答2:

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.



回答3:

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