For the complete documentation index, see llms.txt. This page is also available as Markdown.

Run server-side script

This is only supported in DeployR Enterprise. Applies to: DeployR 1.1 and later.

The Run server-side script step will run the specified script (e.g. "filename.ps1") on the DeployR server in the context of the service account. It will receive the list of task sequence variables currently set on the client, and it can return back additional values that can be added to the task sequence environment.

The script itself must be located in the "Scripts" folder in the configured content location. IE "DeployR Content Location\scripts". By default, this location is C:\ProgramData\2Pint Software\DeployR\Scripts. Note, most of the time, organizations change the default, so if you're unsure where your DeployR Content location is, you can always confirm in the DeployR Configuration Editor:

An example script named "SampleServerScript.ps1" can be found in the "Tools" folder in the installation path, e.g. C:\Program Files\2Pint Software\DeployR\Tools. This example shows how to receive specific task sequence variables as named parameters, in this case a variable named "HardwareHash", and how extra parameters can be processed to get or act on the full list:

Because the task sequence variable values are passed as name-value pairs, the extra arguments need to be processed to associate the two into a hash table:

New task sequence variables can be set by having the script return new PSCustomObject instances to the pipeline:

Other types of objects should not be written to the pipeline.

The output from PowerShell-standard "Write-Information," "Write-Warning", "Write-Error" and "Write-Verbose" cmdlets will be written to the DeployR service's Logger event log.

Last updated