Share via


SPQuota.StorageMaximumLevel property

Gets or sets a limit on all disk space used by the site collection.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property StorageMaximumLevel As Long
    Get
    Set
'Usage
Dim instance As SPQuota
Dim value As Long

value = instance.StorageMaximumLevel

instance.StorageMaximumLevel = value
public long StorageMaximumLevel { get; set; }

Property value

Type: System.Int64
A 64-bit integer that specifies the limit on disk space used. The default value is 0 (zero).

Examples

The following code example sets a maximum level and a warning level for storage in a specified site collection.

Dim siteCollection As New SPSite("http://MySiteCollection")
Dim quota As SPQuota = siteCollection.Quota

quota.StorageMaximumLevel = 20000000 'bytes
quota.StorageWarningLevel = 10000000 'bytes

siteCollection.Quota = quota 
SPSite siteCollection = new SPSite("http://MySiteCollection");
SPQuota quota = siteCollection.Quota;

quota.StorageMaximumLevel = 20000000; //bytes
quota.StorageWarningLevel = 10000000; //bytes

siteCollection.Quota = quota;

See also

Reference

SPQuota class

SPQuota members

Microsoft.SharePoint.Administration namespace