kwizcom banner advertisement

Configure Resource Throttling in SharePoint 2013 using PowerShell

What is Resource throttling?
Large lists are always performance killers in SharePoint. Luckily starting from SharePoint 2010, There is a feature called "Throttling" introduced to address this issue. 

Any operation such as data retrieval, update, delete of more than 2000 rows results low performance in SharePoint 2007 days. Throttling defines the Maximum number of rows user can query at a time. Any operation beyond this count displays an error message. The default value for this setting in SharePoint 2010 is 5000.

We manage resource throttling settings in SharePoint 2013 by navigating to:
  • Central Administration >> Manage Web Applications >> select the target web application
  • From the ribbon, Click on General settings >> Resource Throttling
Configure Resource Throttling in SharePoint 2013 using PowerShell

Configure List throttling settings with PowerShell:
Use the below script to configure resource throttling settings for SharePoint 2013 using PowerShell
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Function to set Resource throttling values in SharePoint 2013
Function Set-ResourceThrottling
{
param (
[parameter(Mandatory=$true)] [string]$WebAppURL,

[parameter(Mandatory=$true)] [string]$ListViewThreshold,

[parameter(Mandatory=$true)] [boolean]$AllowOMOverride,

[parameter(Mandatory=$true)] [string]$ListViewThresholdForAdmins,

[parameter(Mandatory=$true)] [string]$MaxLookupFields
)

#Get the Web Application
$WebApp = Get-SPWebApplication $WebAppURL

#Set List View Threshold 
$WebApp.MaxItemsPerThrottledOperation = $ListViewThreshold

#Enable Object Model Override
$WebApp.AllowOMCodeOverrideThrottleSettings= $AllowOMOverride

#Set List View Threshold  for Admins
$WebApp.MaxItemsPerThrottledOperationOverride = $ListViewThresholdForAdmins

#Set List View Lookup Threshold
$WebApp.MaxQueryLookupFields = $MaxLookupFields #List View Lookup Threshold

$WebApp.Update()

Write-Host "Throttling settings has been updated on" $WebApp.URL
}

#Call the function to configure resource throttling values
Set-ResourceThrottling "http://intranet.crescent.com" "6000" $true "25000" "10" 

Enable/Disable Throttling at List level:
We can't set throttling limits on specific SharePoint list or library. But we can disable/enable throttling on it. Here is my PowerShell script to disable resource throttling on a particular list: Disable list throttling to access large lists in SharePoint 2010/2013
Configure Resource Throttling in SharePoint 2013 using PowerShell Configure Resource Throttling in SharePoint 2013 using PowerShell Reviewed by Salaudeen Rajack on March 16, 2015 Rating: 5

2 comments:

  1. Will this Powershell work for o365 SharePoint Online 2013?

    ReplyDelete
    Replies
    1. We don't have the option of overriding the List View Threshold in Office 365 / SharePoint Online.

      Delete

Please Login and comment to get your questions answered!

Powered by Blogger.