Quantcast
Viewing all articles
Browse latest Browse all 21975

Get Sitecollection and Sub Sites Data Base Size Using PowerShell

Hi All,

Currently i am getting the Site collection database size using this powershell

$SiteCollurl = @{Expression={$_.url};Label="Site Collection URL"}

$size = @{Expression={[math]::round($_.diskused/1MB, 2)};label="DB Size in MB"}

$HTML = Get-SPSiteAdministration -Limit All | select $SiteCollurl, $size

So in this $HTML i am getting all the Site Collection Url's and DB size for each site collection.

Now i want to get the Sub Sites url and Sub Sites Database size also.

I tried like this  "$HTML = Get-SPSiteAdministration -Limit All | | Get-SPSite -Limit All | Get-SPWeb -Limit All  | select $SiteCollurl, $size"

I am getting all the sub site url's but Database size i am getting 0 for all sites and sub sites.

Can any one help on this.how to get the database size for all site collection's and sub sites.

Regards,

Phani.

Rhys W Edwards Where are you :)



Viewing all articles
Browse latest Browse all 21975

Trending Articles