Skip to content

Execute Process

Executes a specified process with given arguments and options. This PowerBrick allows you to run any executable or command-line tool on the target machine, providing flexibility for various use cases such as software installation, system configuration, or running custom scripts.

Required

Specifies the full path to the executable or command to run. This should be the complete path to the executable file or a command that is available in the system PATH.\nSample: C:\Windows\System32\dism.exe

Optional

Specifies the command-line arguments to pass to the process.\nSample: /Online /Add-Driver /Driver:C:\Drivers\wifidriver\driver.inf

Optional

Specifies the working directory for the process. If not specified, the process will use its default working directory. Sample: C:\temp

Required — Default: True

Enable to wait for the process to finish before continuing. Disable to continue immediately after process start.

Optional — Default: Hidden

The Window style of the process. (Hidden, Normal, Minimized, Maximized) Allowed values: Hidden, Normal, Minimized, Maximized.

Required — Default: False

Enable to validate that the process path exists on the endpoint before execution. Disable to skip this validation.

Optional — Default: SYSTEM

Specifies the user context in which to run the process. SYSTEM (default), LoggedOnUser (runs as currently logged-on user, retries later if no user is logged on), or TempAdministratorUser (runs as temporary admin account with automatic cleanup). Allowed values: Logged On User, Temp Administrator User, SYSTEM.

Required

Specify the return codes and their behavior Allowed values: Success, Retry Execution Later.

  • Category: Installer
  • Brick ID: Execute-Process
{
"category": "installer",
"description": "Executes a specified process with given arguments and options. This PowerBrick allows you to run any executable or command-line tool on the target machine, providing flexibility for various use cases such as software installation, system configuration, or running custom scripts.",
"developerVendor": "CapaSystems A/S",
"displayName": null,
"id": "Execute-Process",
"name": "Execute Process",
"parameters": [
{
"defaultValue": "",
"defaultValueObject": null,
"description": "Specifies the full path to the executable or command to run. This should be the complete path to the executable file or a command that is available in the system PATH.\\nSample: C:\\Windows\\System32\\dism.exe",
"id": "ProcessPath",
"name": "Process Path",
"regExValidation": "",
"required": true,
"type": "TextBox",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": "",
"defaultValueObject": null,
"description": "Specifies the command-line arguments to pass to the process.\\nSample: /Online /Add-Driver /Driver:C:\\Drivers\\wifidriver\\driver.inf",
"id": "ProcessArguments",
"name": "Process Arguments",
"regExValidation": "",
"required": false,
"type": "TextBox",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": "",
"defaultValueObject": null,
"description": "Specifies the working directory for the process. If not specified, the process will use its default working directory. Sample: C:\\temp",
"id": "WorkingDirectory",
"name": "Working directory path",
"regExValidation": "",
"required": false,
"type": "TextBox",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": "True",
"defaultValueObject": null,
"description": "Enable to wait for the process to finish before continuing. Disable to continue immediately after process start.",
"id": "ProcessWait",
"name": "Wait for process",
"regExValidation": "",
"required": true,
"type": "Boolean",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": null,
"defaultValueObject": {
"id": "0",
"name": "Hidden"
},
"description": "The Window style of the process. (Hidden, Normal, Minimized, Maximized)",
"id": "WindowStyle",
"name": "Window Style",
"regExValidation": "",
"required": false,
"type": "ComboBox",
"value": null,
"values": [],
"valuesObject": [
{
"id": "0",
"name": "Hidden"
},
{
"id": "1",
"name": "Normal"
},
{
"id": "2",
"name": "Minimized"
},
{
"id": "3",
"name": "Maximized"
}
]
},
{
"defaultValue": "False",
"defaultValueObject": null,
"description": "Enable to validate that the process path exists on the endpoint before execution. Disable to skip this validation.",
"id": "CheckProcessExist",
"name": "Check if process exist",
"regExValidation": "",
"required": true,
"type": "Boolean",
"value": null,
"values": [],
"valuesObject": null
},
{
"defaultValue": null,
"defaultValueObject": {
"id": "SYSTEM",
"name": "SYSTEM"
},
"description": "Specifies the user context in which to run the process. SYSTEM (default), LoggedOnUser (runs as currently logged-on user, retries later if no user is logged on), or TempAdministratorUser (runs as temporary admin account with automatic cleanup).",
"id": "UserContext",
"name": "User Context",
"regExValidation": "",
"required": false,
"type": "ComboBox",
"value": null,
"values": [],
"valuesObject": [
{
"id": "LoggedOnUser",
"name": "Logged On User"
},
{
"id": "TempAdministratorUser",
"name": "Temp Administrator User"
},
{
"id": "SYSTEM",
"name": "SYSTEM"
}
]
},
{
"defaultValue": [
{
"code": 0,
"option": {
"name": "Success",
"id": "success"
}
},
{
"code": 3010,
"option": {
"name": "Success",
"id": "success"
}
}
],
"defaultValueObject": null,
"description": "Specify the return codes and their behavior",
"id": "Codehandle",
"name": "Return Code Handles",
"regExValidation": "",
"required": true,
"type": "CodeHandles",
"value": null,
"values": [],
"valuesObject": [
{
"id": "success",
"name": "Success"
},
{
"id": "retrylater",
"name": "Retry Execution Later"
}
]
}
],
"powershell": {
"base64Encoded": true,
"function": "ZnVuY3Rpb2..."
},
"type": "powerbrick",
"version": "2026.7.2.1"
}