Current Storage Used Figure is Incorrect for a Site Collection

MOSS 2007 and SharePoint 2010 keep a record of the total storage consumed by each Site collection; this is presented in Central Administration within the Site Collection Quotas and Locks page and also the Storage Space Allocation page within each Site collection in MOSS 2007. This figure is used by SharePoint to determine if a Site collection is exceeding its configured storage quota.

Occasionally this figure can be incorrect and may not accurately reflect the total amount of storage that is actually being consumed by the Site collection. If you ever encounter this scenario you can tell SharePoint to recalculate this figure by using the Windows PowerShell commands below, these use the RecalculateStorageUsed method - https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.recalculatestorageused.aspx. Simply replace the highlighted URL with that of the Site collection that you want to recalculate and then either run the commands manually or save as a .ps1 file and execute as a script.

MOSS 2007

[void][system.reflection.assembly]::loadwithpartialname("Microsoft.SharePoint")

$URL = "https://moss2007"

$Site = New-Object
Microsoft.SharePoint.SPSite($URL)

$Site.RecalculateStorageUsed()

SharePoint 2010

$URL = "https://sp2010"

$Site = Get-SPSite -identity $URL

$Site.RecalculateStorageUsed()

 

Brendan Griffin