Review Farm Configuration Values
Scenario/Problem: You want to see the farm configuration values.
Solution: Use the Get-SPFarmConfig
cmdlet without any parameters.
Several configuration settings are available using SPFarmConfig
. Execute the Get-SPFarmConfig
without any parameters, as shown in Listing 1, to display the current values. Figure 1 shows some sample output.
Listing 1. Displaying All Farm Configuration Values
Get-SPFarmConfig
Figure 1. Get-SPFarmConfig displays the current farm values.
This is not the most exciting list
of configuration values; however, they could impact the behavior of
your SharePoint farm. The next section explains how to change these
values.
Set the Farm Configuration Values
Scenario/Problem: You want to modify the farm configuration values displayed in the previous section.
Solution: Use the Set-SPFarmConfig
cmdlet with the configuration parameters.
You can modify the values in the previous section using the Set-SPFarmConfig
cmdlet with the associated parameter of each value. The parameters for these configuration values are as follows:
• ASPScriptOptimizationEnabled
• DataFormWebPartAutoRefreshEnabled
• WorkflowBatchSize
• WorkflowEventDeliveryTimeout
• WorkflowPostponeThreshold
The ASPScriptOptimizationEnabled
parameter is a Boolean parameter that determines whether ASP scripting is allowed to be optimized by IIS.
The DataFormWebPartAutoRefreshEnabled
parameter is a Boolean parameter that determines whether the data form
web parts on the SharePoint web pages are allowed to automatically
refresh using the asynchronous Ajax settings. If this value is set to false
, the data form web parts will not automatically refresh, regardless of the web part Ajax settings.
The WorkflowBatchSize
value defaults to 100
and determines the number of events that can be processed for a single workflow instance. The value must be greater than 0
but can be as large as the maximum integer value.
The WorkflowEventDeliveryTimeout
parameter specifies the number of minutes that a workflow can run before it times out. The default value is 5
minutes, but it can be any positive integer. If the workflow times out,
it is placed back into the queue to attempt execution again.
The WorkflowPostponeThreshold
parameter determines how many workflows can operate at the same time. The default is 15
workflows, but this can be any integer value. If the number of
workflows that need to run exceeds this amount, the excess workflows
are placed in the queue and must wait for the running workflows to
finish.
If you haven’t noticed, the parameter names are exactly the same as in the output from Get-SPFarmConfig
. Listing 2 shows a sample command line for setting these values.
Listing 2. Setting the Farm Configuration Values
Set-SPFarmConfig -ASPScriptOptimizationEnabled:$true
-DataFormWebPartAutoRefreshEnabled:$false -WorkflowBatchSize 50
-WorkflowEventDeliveryTimeout 20 -WorkflowPostponeThreshold 10
Run the Get-SPFarmConfig
cmdlet to verify your changes.
Note
The ASPScriptOptimizationEnabled
parameter is not documented as part of the cmdlet help but is indeed an accepted Boolean parameter for Set—SPFarmConfig
.