SharePoint 2013

Applies to: SharePoint Foundation 2013, SharePoint Server 2013 Enterprise

Topic Last Modified: 2015-03-09

Sets a global property or a collection of global properties for the local farm.

Set-SPFarmConfig [-ASPScriptOptimizationEnabled <$true | $false>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DataFormWebPartAutoRefreshEnabled <$true | $false>] [-Force <SwitchParameter>] [-InstalledProductsRefresh <SwitchParameter>] [-ServiceConnectionPointBindingInformation <String>] [-ServiceConnectionPointDelete <SwitchParameter>] [-UserAccountDirectoryPathIsImmutable <Nullable>] [-WhatIf [<SwitchParameter>]] [-WorkflowBatchSize <Int32>] [-WorkflowEventDeliveryTimeout <Int32>] [-WorkflowPostponeThreshold <Int32>]

The Set-SPFarmConfig cmdlet updates a collection of global settings for the local farm that are not members of the SPFarm object. Use the Get-SPFarmConfig cmdlet to read global settings for the local farm and to create a new PSCustomObject object from the collection of properties returned from the local farm, and then add this object to the pipeline. Modify the PSCustomObject object and pass it to the Set-SPFarmConfig cmdlet to change the parameter values.

The properties collected in the PSCustomObject object must be farm-wide settings, and must be configurable only once for the entire farm. The parameter name added to the PSCustomObject object must match exactly the input parameter name for the Set-SPFarmConfig cmdlet.

SharePoint Management Shell


Parameter Required Type Description




Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.




Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters




Specifies whether any DataFormWebPart on any page in this farm is allowed to periodically refresh its contents asynchronously (after the page has finished rendering). When set to false, all DataFormWebParts will ignore the automatic refresh interval provided in Web Part properties.




Forces the deletion or updating of the service connection point.




Updates the current machine license state with the list of products that are installed in the farm.




Adds or updates the service connection point for the current farm in Active Directory Domain Service (AD  DS).

The type must be an array of strings that are key value pairs that will be added to the service connection point.




Delete the service connection point for the current farm in AD DS.




Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters




Specifies the paging size for events delivered to a single workflow instance. For each request, the events are streamed out 100 at a time.

Batch size is the number of events processed for a single workflow instance, which can have many events queued at the same time. Throttle will override batch size; if the workflow instance cannot be started or restarted because there are too many instances running across all front-end Web servers, none of the events will be fetched, regardless of the batch size.




Specifies the time as an integer in which a workflow job must run without the job timing out. If the workflow job does time out, it gets put back in the queue to be run again.

For example, if the value is set to 5, the workflow job must run within 5 minutes are the workflow job will time out. Any workflow job that does time out is placed back in the queue to run again.The default value is 5.




Specifies the number of workflows that can be running in IIS against a content database at a time before new workflow instances get postponed into a queue.


$a = Get-SPFarmConfig
$a.AjaxTimeout = 200
$a | Set-SPFarmConfig

This example uses the Get-SPFarmConfig cmdlet to add the Ajax Timeout setting to the PSCustomObject object, sets the value for Ajax Timeout, and then passes PSCustomObject to the Set-SPFarmConfig cmdlet to change the Ajax Timeout setting. Ajax Timeout, a farm-wide setting, is a member of the SPWebService object and cannot be accessed by using a Windows PowerShell cmdlet.

You can perform the same operations with either of the following commands.

Set-SPFarmConfig -AjaxTimeout 200