Create Installation Tasks for Windows Devices from ConnectWise RMM

The WatchGuard Agent is responsible for the deployment of WatchGuard product software. To facilitate this in ConnectWise RMM, you can use automation tasks to create installation tasks for the WatchGuard Agent on your Windows devices. Complete one of these procedures:

After you create the task, you schedule it. For more information, go to Schedule the Installation Task.

Create a Task to Install the WatchGuard Agent on Windows Devices

Before you begin, make sure that you have configured the WatchGuard Agent plug-in to automatically map ConnectWise RMM companies with WatchGuard Cloud accounts.

You must also have the runner_shell.ps1 script, available from the downloaded ConnectWiseRMM.ZIP file. The provided script is used to automate agent installation when the account mapping is completed in the WatchGuard Agent onboarding application or you have manually mapped accounts to the specified custom fields.

To create a task to install the WatchGuard Agent on Windows devices, from ConnectWise RMM:

  1. Go to Automation > Tasks.

Screen shot of ConnectWise RMM, Tasks page

  1. In the upper-right, click Add > Script Editor.
  2. In the Name box, type WatchGuard Agent - Install agent on Windows.
  3. In the Description box, type This script installs WatchGuard Agent on Windows devices.
  4. From the Category drop-down list, select Setup.
  5. In the Script Editor section, click Add Row.

Screen shot of ConnectWise RMM, New Script page

  1. Add a pre-defined variable for the WatchGuard Account ID:
    1. From the drop-down list, select Function.
    2. Select Set Pre-defined Variable.
    3. In the dialog box that opens, in the Variable Name text box, type AccountID.
    4. Select Custom Field.
    5. Select WatchGuard Account ID.
      Screen shot of ConnectWise RMM, Set Pre-defined Variable dialog box
    6. Click Save.
    7. From the Operating System drop-down list, select Windows.
  2. Add a pre-defined variable for the WatchGuard Token:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Set Pre-defined Variable.
    4. In the dialog box that opens, in the Variable Name text box, type Token.
    5. Select Custom Field.
    6. Select WatchGuard Token.
    7. Click Save.
    8. From the Operating System drop-down list, select Windows.
  3. Add a user variable to run the PowerShell script runner_shell.ps1:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Set User Variable.
    4. In the dialog box that opens, in the Variable Name text box, type ScriptAction.
    5. In the Value text box, type installv2.
      Screen shot of ConnectWise RMM, Set User Variable dialog box
    6. Click Save.
    7. From the Operating System drop-down list, select Windows.
  4. Add the PowerShell Script:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select PowerShell Script.
    4. Copy and paste the PowerShell script runner_shell.ps1 into Script.
    5. Click Save.
    6. From the Operating System drop-down list, select Windows.
  5. Define a script log message to include the script results:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Script Log.
    4. In the Script Log Message box, type %output%.
    5. Click Save.
    6. From the Operating System drop-down list, select Windows.

Screen shot of ConnectWise RMM, Script Editor page

  1. In the upper-right corner, click Save.
    You can now Schedule the Installation Task.

Create a Task to Install the WatchGuard Agent on Windows Devices Manually Mapped in the Onboarding Application

Before you begin, make sure that you have manually mapped the ConnectWise RMM and WatchGuard Cloud accounts. Complete the procedure in this section to create an installation task when you did not configure the API integration between ConnectWise RMM and WatchGuard Cloud. You must also have the runner_shell.ps1 script available from the downloaded ConnectWiseRMM.ZIP file. The provided script is used to automate agent installation when the account mapping is completed in the WatchGuard Agent onboarding application or you have manually mapped accounts to the specified custom fields.

For more information, go to Manually Map ConnectWise RMM and WatchGuard Cloud Accounts.

To add a task to install the WatchGuard Agent on Windows devices when you did not configure a connection with ConnectWise RMM:

  1. Go to Automation > Tasks.

Screen shot of ConnectWise RMM, Tasks page

  1. In the upper-right corner, click Add > Script Editor.
  2. In the Name box, type WatchGuard Agent - Install agent on Windows with manual options.
  3. In the Description box, type This script installs WatchGuard Agent on Windows devices.
  4. From the Category drop-down list, select Setup.

Screen shot of ConnectWise RMM, New Script dialog box

  1. In the Script Editor section, click Add Row.
  2. Add a pre-defined variable for the WatchGuard Account ID:
    1. From the drop-down list, select Function.
    2. Select Set Pre-defined Variable.
    3. In the dialog box that opens, in the Variable Name text box, type AccountID.
    4. Select Custom Field.
    5. Select WatchGuard Account ID.
      Screen shot of ConnectWise RMM, Set Pre-Defined Variable dialog box
    6. Click Save.
    7. From the Operating System drop-down list, select Windows.
  3. Add a pre-defined variable for the WatchGuard Token:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Set Pre-defined Variable.
    4. In the dialog box that opens, in the Variable Name text box, type Token.
    5. Select Custom Field.
    6. Select WatchGuard Token.
    7. Click Save.
    8. From the Operating System drop-down list, select Windows.
  4. Add a pre-defined variable for the WatchGuard Client Company ID:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Set Pre-defined Variable.
    4. In the dialog box that opens, in the Variable Name text box, type ClientId.
    5. Select Custom Field.
    6. Select WatchGuard Client Company ID.
    7. Click Save.
    8. From the Operating System drop-down list, select Windows.
  5. Add a pre-defined variable for the WatchGuard Deployment ID:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Set Pre-defined Variable.
    4. In the dialog box that opens, in the Variable Name text box, type DeploymentSetting.
    5. Select Custom Field.
    6. Select WatchGuard Deployment ID.
    7. Click Save.
    8. From the Operating System drop-down list, select Windows.
  6. Add a user variable to run the PowerShell script runner_shell.ps1:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Set User Variable.
    4. In the dialog box that opens, in the Variable Name text box, type ScriptAction.
    5. In the Value text box, type installv2.
      Screen shot of ConnectWise RMM, Set User Variable dialog box
    6. Click Save.
    7. From the Operating System drop-down list, select Windows.
  7. Add the PowerShell script:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select PowerShell Script.
    4. Copy and paste the PowerShell script runner_shell.ps1 into Script.
    5. Click Save.
    6. From the Operating System drop-down list, select Windows.
  8. Create a script log message to include the script results:
    1. Click Add Row.
    2. From the drop-down list, select Function.
    3. Select Script Log.
    4. In the Script Log Message box, type %output%.
    5. Click Save.
    6. From the Operating System drop-down list, select Windows.

Screen shot of ConnectWise RMM, Script Editor page

  1. In the upper-right corner, click Save.
    You can now Schedule the Installation Task.

Schedule the Installation Task

After you create the task, you can schedule it to run now, when the RMM agent next connects with ConnectWise, or at a specific scheduled time.

To schedule the installation task in ConnectWise RMM:

  1. Go to Automation > Tasks
  2. Select the task you want to schedule.
  3. Click the in the row for the task.
  4. Select a Schedule Mode.
  5. To select the target resources (companies and sites), click Select Targets.

Screen shot of ConnectWise RMM, Schedule Task page

  1. Click Run.

View the Task Results

After the task runs, you can view the history and execution results in the Scheduled Tasks section.

To view the history and execution results in ConnectWise RMM:

  1. Go to Automation > Scheduled Tasks.
  2. Select the scheduled task that you want to view the history for.

Screen shot of ConnectWise RMM, Schedule Task history page

  1. To view the execution results, in the Resource Name column, select the endpoint of the executed task.
  2. Select the task name.
    The Task Output dialog box opens.

Screen shot of ConnectWise RMM, Task output page

Related Topics

Configure the WatchGuard Cloud and ConnectWise RMM Connection

Create Installation Tasks for Mac Devices from ConnectWise RMM