Get-SPSiteAdministration .DiskUsed return nothing

In the article of moving site collection from one content database to another content database on TechNet, There is a PowerShell script which tells how much space used by the site collection:

$used = (Get-SPSiteAdministration -Identity <http://ServerName/Sites/SiteName>).DiskUsed


If you run this on your SharePoint 2010 Management Shell, you will get nothing displayed when you try to show the value of $used.

You will need to run the following code first before you run the above 2 lines of code

Start-SPAssignment -Global

This is a tip from Microsoft SharePoint forum.

You can also use

$storage = (Get-SPSite http://siteUrl).Usage.Storage

this is will get a much larger value than the previous command. I think the reason is that in the previous command: “The amount of disk space that is displayed does not include the disk space used by the auditing data that will be moved with the site collection.”

Read More