Get SPSite Usage in MB Using Powershell

Below is the code to get the same :

$usage = $spSite.usage.storage/1MB

Issues :  When you execute the above script most of the site collections will returning null / zero. When i check the same using STSADM enumsites command it is again different.

Solution : Log off from the server re-login as farm administrator account.


Conclusion : Farm administrator who has full control on all the SQL, SharePoint can only be allowed to pull the information.

Comments

Popular posts from this blog

Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException", SharePoint exception after applying cumulative update\service pack

Change SharePoint Site Time Format

Get list of all users in a site collection and get all the web parts in a page