Share via


Set-SPFarmConfig

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

Syntax

Default (Default)

Set-SPFarmConfig
    [-AssignmentCollection <SPAssignmentCollection>]
    [-Confirm]
    [-DataFormWebPartAutoRefreshEnabled <Boolean>]
    [-Force]
    [-InstalledProductsRefresh]
    [-ServiceConnectionPointBindingInformation <String>]
    [-ServiceConnectionPointDelete]
    [-WhatIf]
    [-WorkflowBatchSize <Int32>]
    [-WorkflowEventDeliveryTimeout <Int32>]
    [-WorkflowPostponeThreshold <Int32>]
    [-ASPScriptOptimizationEnabled <Boolean>]
    [-UserAccountDirectoryPathIsImmutable]
    [-DefaultActivateOnSiteMasterValue <Boolean>]
    [-MaxSiteSubscriptionSettingsValueLength <UInt32>]
    [-MaxTenantStoreValueLength <UInt32>]
    [-SiteMasterMode <SPSiteMasterMode>]
    [-SiteMasterValidationIntervalInHours <UInt32>]
    [<CommonParameters>]

Description

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.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

EXAMPLE

Set-SPFarmConfig -WorkflowBatchSize 50

This example sets the WorkflowBatdhSize to 50.

Parameters

-ASPScriptOptimizationEnabled

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies if ASP Script optimization is enabled. The default value is false (off).

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-AssignmentCollection

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:SPAssignmentCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DataFormWebPartAutoRefreshEnabled

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultActivateOnSiteMasterValue

Applicable: SharePoint Server 2016, SharePoint Server 2019

Specifies whether to activate site master as default.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Forces the deletion or updating of the service connection point.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstalledProductsRefresh

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-MaxSiteSubscriptionSettingsValueLength

Applicable: SharePoint Server 2016, SharePoint Server 2019

Sets the maximum size of a SiteSubscription property value.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxTenantStoreValueLength

Applicable: SharePoint Server 2016, SharePoint Server 2019

Sets the maximum size of a Tenant Store property value.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceConnectionPointBindingInformation

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceConnectionPointDelete

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SiteMasterMode

Applicable: SharePoint Server 2016, SharePoint Server 2019

Specifies if site master mode is turned on or off. The default value is off.

Parameter properties

Type:SPSiteMasterMode
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SiteMasterValidationIntervalInHours

Applicable: SharePoint Server 2016, SharePoint Server 2019

Determines the length of time, in hours, to validate the Site Master.

The default value is 24.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserAccountDirectoryPathIsImmutable

Applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

Specifies if the UserAccountDirectoryPath property on an SPSite object is immutable.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WorkflowBatchSize

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WorkflowEventDeliveryTimeout

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WorkflowPostponeThreshold

Applicable: SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.