PowerShell Execution in the Sync Module
Overview
The Sync Module uses the same managed-runspace and worker-process model as core UNIFYConnect. Its settings are stored in Services/Extensibility/LinkEngine.config.json, separately from the core engine configuration files. In v8.1, Link PowerShell tasks run in the out-of-process worker by default.
See PowerShell Configuration for the common settings and PowerShell Execution Modes for the differences between worker-process, managed-runspace, and legacy execution.
Configuration Settings
The powerShellSettings object accepts the common engine settings documented on the PowerShell Configuration page. Its usageSettings entries may override the following properties for each Link task type:
| Property | Description | Required |
|---|---|---|
$version | Usage-settings schema version. Use 1.0. | Yes |
scriptType | The task type. Supported values are PreProvisioning, PostProvisioning, PreDeprovisioning, PostDeprovisioning, and Synchronisation. | Yes |
executionLocationOverride | Overrides the engine execution mode for this task type. Supported values are InProcess and WorkerProcess. | No |
poolGrowthLimit | Maximum number of managed runspaces added to the pool at one time. The default is 5. This setting applies to managed-runspace execution. | No |
lockWaitTimeout | Maximum time to wait for an available managed runspace. The default is -00:00:00.001, which means no timeout. | No |
Example
"powerShellSettings": {
"$version": "1.1",
"executionMode": "OutOfProcessWorker",
"powerShellExecutionPolicy": null,
"usageSettings": [
{
"$version": "1.0",
"scriptType": "PreProvisioning",
"executionLocationOverride": "InProcess",
"lockWaitTimeout": {
"$fmt": "timeSpan",
"$value": "01:05:00"
},
"poolGrowthLimit": 7
}
],
"outOfProcessSettings": {
"$version": "1.0",
"workerMaxConcurrentExecutions": 200,
"workerLifetimeLimit": {
"$fmt": "timeSpan",
"$value": "24:00:00"
},
"workerMemoryLimit": 1073741824
}
}This example keeps the v8.1 worker-process default for all Link task types except PreProvisioning, which is explicitly run in process. Omit usageSettings when no per-task override is required.