Can anyone let me know how to retreive the storage space for all the site collections and subsites.
Thanks in advance
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Yogendra BhardwajRank #2,141 · 666 reputationPosted Apr 13, 2017, 9:17 AM EDT
MOSS 2007
[void][system.reflection.assembly]::loadwithpartialname("Microsoft.SharePoint")
$URL = "http://Moss2007"
$Site = New-Object Microsoft.SharePoint.SPSite($URL)
$Site.RecalculateStorageUsed()
SharePoint 2010
$URL = "http://Sp2010"
$Site = Get-SPSite -identity $URL
$Site.RecalculateStorageUsed()