The Syntax to create Quota Template is as shown
$Customquota = New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate
$Customquota.Name = "ProjectQuota"
$Customquota.StorageMaximumLevel = 1048576
$Customquota.StorageWarningLevel = 524288
$Service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$Service.QuotaTemplates.Add($Customquota)
$Service.Update()
- Name - You have to give the Quota Template name as string value
- StorageMaximumLevel –Is the maximum size for your site collection(In Bytes)
- StorageWarningLevel-Will give email message if the Quota template reaches the value specified in this column(In Bytes)
To change the quota template for a site collection by using Windows Power Shell
The Syntax Change the Quota Template for a site collection
Set-SPSite -Identity "Site URL" -QuotaTemplate "Template Name"
- Site URL- is the URL of the site collection whose quota template you want to change.
- Template Name -is the name or GUID of the replacement template.