0

Reading this doc I'm confused by the following paragraph:

If you change the values for a quota template, those changes apply only to new site collections to which you apply the template. SharePoint Foundation 2010 does not apply the changed quota values to existing sites collections unless you use the object model to update the quota values in the database.

I have sharepoint foundation 2013, but I assume this behavior is the same. So, if I understand correctly, I create a new site collection with my quota template. If I then change the settings of the template my site collection will still use the old settings. If I want to update the site collections with the new settings I need to use the "object model". Can I do that with powershell?

0

Your understanding is correct. Changing the quota template only modifies the template for site collections created in the future. As each site collection has its own quota settings, the quota template is simply the set of defaults new site collections will use.

A quick Google for how to update existing values pops up an existing SP-SE post:

Why am I still getting quota reached upload error after increasing the quota for a site collection?

SharePointRandy suggests the following PowerShell script:

$OldTemplateName = "Bad Template"
$NewTemplateName = "Good Template"
$WebApplicationUrl = "http://my/"
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$quotaTemplate = $contentService.QuotaTemplates[$OldTemplateName]
$replaceQuotaTemplate = $contentService.QuotaTemplates[$NewTemplateName]
$webApplication = Get-SPWebApplication $WebApplicationUrl
$webApplication.Sites | ForEach-Object { try { if ($_.Quota.QuotaID -eq       
$quotaTemplate.QuotaID) { $_.Quota = $replaceQuotaTemplate } } finally { $_.Dispose();}}

Note: the above script will iterate all site collections in the web application and apply the modifications to each of them. Use caution as you may overwrite other changes that had been previously made. To apply the changes to only a specific site, change the last three lines (from Get-SPWebApplication on) to:

$site = Get-SPSite "http://your/site/collection/url"
try
{
    if ($site.Quota.QuotaID -eq $quotaTemplate.QuotaID)
    {
        $site.Quota = $replaceQuotaTemplate
    }
}
finally
{
    $site.Dispose();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.