Monday, August 13, 2007

Get Storage Space Allocation using Sharepoint SDK

System.Uri uri = new System.Uri("http://");
SPVirtualServer virtualServer = globalAdmin.OpenVirtualServer(uri);
SPSite siteCollection = virtualServer.Sites["http:///"];
MessageBox.Show( "Useage % : " + Convert.ToString(siteCollection.Usage.Storage * 100 / siteCollection.Quota.StorageMaximumLevel));

No comments: