Wednesday, September 4, 2013

SPSite.usage returning null or zero

Here is the small issue i faced and found the solution after 4 hours struggle.

Scenario : I came accross a requirement create a powershell script to get the site usage in MB for all the site collections in a web application.

Below is the code to get the same :

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

Issues : when i ran the above script most of the site collections the it is returning null / zero. When i check the same using STSADM enumsites command it is again diffarent.

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.

1 comment:

  1. Why Can't I Log in to QuickBooks Online? · Use a Different QB Online Login Link · Use Incognito Mode · Update or Reinstall Your Browser. Real-time problems and outages for QB Online Login. Is the server down? Can't log in? Here you see what is going on.

    QuickBooks Running Slow
    QuickBooks ProAdvisor
    QuickBooks Error 6000
    QuickBooks Tool Hub

    ReplyDelete