Determine SharePoint site collection disk usage
To understand the size of site collection, you can use DiskUsed property in PowerShell console. For example:
$site = Get-SPSite http://sp10dev $size = (Get-SPSiteAdministration -Identity $site).DiskUsed Write-host "Size of site collection is: "$size
If you use SharePoint 2010, you need to add before this code command "Start-SPAssignment -Global" otherwise it returns empty value. Don’t forget to add "Stop-SPAssignment -Global" after code.
Start-SPAssignment -Global $site = Get-SPSite http://sp10dev $size = (Get-SPSiteAdministration -Identity $site).DiskUsed Write-host "Size of site collection is: "$size Stop-SPAssignment -Global
To determine size of site collection in SharePoint 2010 you can use another property called "Usage.Storage". This property doesn’t require "Start-SPAssignment -Global"
$site = Get-SPSite http://sp10dev $size = (Get-SPSite -Identity $site).Usage.Storage Write-host "Size of site collection is: "$size