4. Configure the Search Query Threshold
Scenario/Problem:
You would like to configure the minimum time between calls to the
Search Service within the Work Management Service application.
Solution: Use the Set-SPWorkManagementServiceApplication
cmdlet with the -MinimumTimeBetweenSearchQueries
parameter.
You can use the -MinimumTimeBetweenSearchQueries
cmdlet to configure the minimum amount of time between calls to the
Search Service to identify updated or new tasks within task lists. The
search query occurs during the provider refresh process. The service application waits until the time specified before it processes new search queries.
The data type of this parameter is System.TimeSpan
; therefore, creating a new time span variable to provide is recommended (see Listing 4).
Listing 4. Configuring the Search Query Setting
$refreshTimeSpan = New-TimeSpan -Minutes 15
Set-SPWorkManagementServiceApplication
-Identity "Work Management Service"
-MinimumTimeBetweenSearchQueries $refreshTimeSpan
The Identity
parameter also can be a specific Work Management Service application instance using the Get-SPServiceApplication
cmdlet, as explained in the previous section.
5. Configure the User Synchronization Per Server
Scenario/Problem: You would like to configure the maximum number of users that each server can synchronize.
Solution: Use the Set-SPWorkManagementServiceApplication
cmdlet with the -NumberOfExchangeJobsPerServer
parameter.
You can use the -NumberOfExchangeJobsPerServer
cmdlet to configure the maximum number of users that may be
synchronized per server. A server is categorized by any server in the
farm that is running the Exchange Server sync timer job.
The data type for this parameter is System.UInt32
; therefore, you may provide an integer value, as shown in Listing 5. The minimum value technically should be the number of SharePoint users divided by the number of servers that run timer jobs.
Listing 5. Configuring the User Synchronization Setting
Set-SPWorkManagementServiceApplication
-Identity "Work Management Service"
-NumberOfExchangeJobsPerServer 1000
The actual timer job is named Work Management Synchronize with Exchange.