SharePoint - Check the Site collection size using PowerShell


PS C:\> Get-SPSite | select url, @{label="Size in MB";Expression={$_.usage.storage/1MB}} | Sort-Object -Descending -Property "Size in MB" | Format-Table -AutoSize

Url                                                            Size in MB
---                                                            ----------
http://my.contoso.com/personal/todd                      49.2326898574829
http://sharepoint/sites/blob                             34.5743083953857
http://sharepoint/sites/team                             32.6884136199951
http://sharepoint                                        9.17551040649414
http://sharepoint/sites/portal                           7.49533176422119
http://sharepoint/my/personal/todd                        6.4399299621582
http://go.contoso.com                                    5.47069644927979
http://sharepoint/sites/Records                          3.46581363677979
http://sharepoint/sites/Office_Viewing_Service_Cache     3.03256511688232
http://sharepoint/my/personal/shane                      2.69485092163086
http://sharepoint/my/personal/laura                      2.69484710693359
http://my.contoso.com/personal/shane                     2.67459964752197
http://my.contoso.com/sites/Office_Viewing_Service_Cache 2.23387622833252
http://go.contoso.com/sites/Office_Viewing_Service_Cache 2.23387145996094
http://sharepoint/sites/gordo                            2.16320991516113
http://sharepoint/my                                     1.94260501861572
http://my.contoso.com                                    1.91326522827148


If you want to check for a particular Site Collection then run the below comments 

PS C:\> $sc = Get-SPSite http://sharepoint
PS C:\> $sc | Get-Member

(here you will get all the properties. After that run the below comment)
PS C:\> $sc.Usage


Storage           : 9621220
Bandwidth         : 0
Visits            : 0
Hits              : 0
DiscussionStorage : 0

Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell