How to get\set external List Throttling using powershell – SharePoint 2010

The following PowerShell script demonstrates how to get and set the External List throttles:

$snapin = Get-PSSnapin | where-object { $_.Name -eq 'Microsoft.SharePoint.PowerShell' }if ($snapin -eq $null)
write-host "Loading SharePoint PowerShell Snapin…" -foregroundcolor Blue
add-pssnapin "Microsoft.SharePoint.PowerShell" write-host "SharePoint PowerShell Snapin loaded." -foregroundcolor Green

$bdcAppProxy = Get-SPServiceApplicationProxy | where {$_ -match "Business Data Connectivity"}

Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items – ServiceApplicationProxy $bdcAppProxy

$throttleDb = Get-SPBusinessDataCatalogThrottleConfig -Scope Database – ThrottleType Items -ServiceApplicationProxy $bdcAppProxy

#Alternative way to write out settings write-host $throttleDb.Default
#Uncomment to set your throttle limits

#Set-SPBusinessDataCatalogThrottleConfig -Identity $throttleDb -maximum 12000 -default 10000

$throttleWCF = Get-SPBusinessDataCatalogThrottleConfig -Scope WCF -ThrottleType Size -ServiceApplicationProxy $bdcAppProxy

#Set-SPBusinessDataCatalogThrottleConfig -Identity $throttleWCF -maximum 100000000 -default 50000000

$throttleConn = Get-SPBusinessDataCatalogThrottleConfig -Scope Global -ThrottleType Connections -ServiceApplicationProxy $bdcAppProxy

#Set-SPBusinessDataCatalogThrottleConfig -Identity $throttleConn -maximum 200 -default 150

write-host "Completed Run" -foregroundcolor Blue