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, a feature called “Throttling” was introduced to address this issue. 

Any operation such as data retrieval, update, delete of more than 2000 rows results in low performance in SharePoint 2007 days. Throttling defines the Maximum number of rows a user can query at a time, and 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 "https://intranet.crescent.com" "6000" $true "25000" "10" 

Enable/Disable Throttling at List level:

We can’t set throttling limits on a 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

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

2 thoughts on “Configure Resource Throttling in SharePoint 2013 using PowerShell

  • Will this Powershell work for o365 SharePoint Online 2013?

    Reply
    • We don’t have the option of overriding the List View Threshold in Office 365 / SharePoint Online.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *