Created
October 27, 2017 06:24
-
-
Save rheid/ec20262e50c4457b680800727a440d30 to your computer and use it in GitHub Desktop.
Configure Resource Throttling in SharePoint 2013 using PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
Read more: http://www.sharepointdiary.com/2015/03/configure-resource-throttling-in-sharepoint-2013-using-powershell.html#ixzz4wgesxfLz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment