Configure KACE K1000 Scripts

Create Scripted Sessions

The following sections explain how to configure a Dell KACE K1000 script which will automatically start a one-time Bomgar session with any given KACE-managed Windows or Mac system. At the end of the session, the Bomgar client will remove itself automatically, but the script can be re-run to start another session (or multiple sessions) with the same system. Windows systems do not require a user to be logged-in for the script to work, but Mac systems do.

Note: This guide is primarily intended for users of kace.bomgar.com since they have no access to Jump Clients. Users of the on-premises Bomgar Appliance should use the Jump Client script instead of the script described here. A Jump Client is a persistent service which allows recurrent Bomgar sessions to the same host while the KACE-scripted session must be run each time a session is to be started.

Windows Script

  1. Configure the InitiateBomgarSession vbs script.
    • Use a convenient location to save the InitiateBomgarSession.vbs file from the Dell KACE Config page on help.bomgar.com.

      Note: Users of the on-premises Bomgar Appliance can download the file here: https://tracker.bomgar.com/public/InitiateBomgarSession.vbs

    • Users of kace.bomgar.com should open the InitiateBomgarSession.vbs script with a text editor, locate WScript.Arguments(0) on line 14, paste over it with the K1000 Run Now Script URL from the Dell KACE Configuration page, and enclose the pasted URL in quotation marks.

      Note: Users of the on-premises Bomgar Appliance should replace WScript.arguments(0) with "https://bomgar.example.com/api/start_session.ns?issue_menu=1" where bomgar.example.com is the URL of the Bomgar Appliance.

    • Save the script and close the text editor.
  2. Log into the Dell KACE /admin interface as an admin, click Scripting , and select New from the Choose Action dropdown.
  3. Configure the KACE script parameters.
    • Focus the Name text box and enter Bomgar - Start Session (bomgar.example.com) where bomgar.example.com is the Bomgar Appliance address (e.g., kace.bomgar.com).
    • Focus the Description text box and enter:
      • This script automatically connects to support.example.com, downloads a Bomgar customer client, and launches it to begin a new Bomgar session.

      where support.example.com is the Bomgar Appliance address used above.

    • Scroll to Operating Systems, uncheck Pick Specific OS Versions, and select Microsoft Windows.
    • Scroll to Schedule and check Allow to run without a logged-in user.
    • Scroll to Dependencies, click Add new dependency > Choose File, and Open the InitiateBomgarSession.vbs script.
    • Configure the KACE script task.
      • Scroll to Tasks and click New Task.
      • Select the Continue radio button for On Failure.
      • Click Add under Verify, click Add a new step and pick Verify a directory exists.
      • Focus the Directory text box, enter C:\Program Files, and click Save Changes.
      • Click Add under On Success, click Add a new step, and select Launch a program.
      • Focus the Directory text box and enter C:\Windows\System32.
      • Focus the File text box and enter wscript.exe.
      • Check the Wait for completion checkbox.
      • Focus the Parameters text box and enter $(KACE_DEPENDENCY_DIR)\InitiateBomgarSession.vbs.
      • Click Save Changes.
    • Click Save at the bottom of the page.

Test

The following test assumes there is access to a working Bomgar representative console and that the system whereon the script is to be run is included and online in the K1000 inventory.

This will require a working KACE agent must to be present on the machine which will run the script. Though there are several ways of installing the agent, a simple method for installation on a single system is given below.

  1. Log into the K1000 /admin interface as an admin, browse to Settings, and click Security Settings.
  2. Check the Enable File Sharing box, scroll to the bottom of the page, and click Save.
  3. Wait for the K1000 appliance to reboot, browse to \\k1000\client\agent_provisioning, and install the agent from the directory appropriate for the test machine's operating system.

Once these steps are complete, the new agent's host should appear listed on the Inventory page of the K1000 in about one minute, depending on the network.

The following test assumes there is access to a working Bomgar representative console and that the system whereon the script is to be run is included and online in the K1000 inventory. This will require a working KACE agent on the system.

  1. Log into the Bomgar representative console.

    Note: This can be done on any available system. It does not need to be in he K1000 inventory, nor does it need to be the same as the system on which the script is to be run, though it may be.

  2. Log into the K1000 /admin interface, click the Scripting page, and select Run Now.
  3. Select the Bomgar - Start Session (bomgar.example.com) script using either the dropdown menu or the filter text box.
  4. Select the desired test machine using either the dropdown or the filter text box.
  5. Click Run Now and wait for the script run to complete.

The script's run status will be shown on the Run Now Status page. Details of the script execution during and after its run can be seen by clicking on the timestamp of the appropriate entry in the Started field to load the Run Now Status Detail page. Once complete, the exact command which was run on the remote system can be reviewed from the View Logs link under either Failed Execution or Successful Execution, depending on whether or not the script succeeded. Once the script completes successfully, a new session should appear in the Bomgar representative console in about one minute, depending on the network. This session will appear in the default queue of the Console. After the session appears, double-click or right-click to Accept the session and gain remote access.

Mac OS X Script

The following steps assume that a Windows version of the script has already been configured and the administrator would like to upgrade the existing script to add support for Mac OS X.

  1. Use a convenient location to save the InitiateBomgarSession.sh file from the Dell KACE Config page on help.bomgar.com.

    Note: Users of an on-premises Bomgar Appliance can download the file from here: https://tracker.bomgar.com/public/InitiateBomgarSession.sh.

  2. Log into the Dell KACE /admin interface as an admin, click Scripting and click the name of the Bomgar - Start Session (bomgar.example.com) script configured previously.
  3. Configure the KACE script parameters.
    • Scroll to Operating Systems and ctrl-click Mac OS X.
    • Scroll to Dependencies, click Add new dependency > Choose File, and Open the InitiateBomgarSession.sh script.
    • Scroll to the bottom of the page and click New Task.
    • Select the Continue radio button for On Failure.
    • Click Add under Verify, click Add a new step, and pick Verify a directory exists.
    • Focus the Directory text box, enter /usr/bin, and click Save Changes.
    • Click Add under On Success, click Add a new step, and pick Launch a program.
    • Focus the Directory text box and enter $(KACE_DEPENDENCY_DIR). Be sure to include the K1000 Run Now Script URL from the Dell KACE Configuration page.
    • Focus the File text box and enter InitiateBomgarSession.sh.
    • Check the Wait for completion checkbox.
    • Focus the Parameters text box and paste the K1000 Run Now Script URL from the Dell KACE Configuration page.

      Note: Users of an on-premises Bomgar Appliance should enter https://bomgar.example.com/api/start_session.ns?issue_menu=1 where bomgar.example.com is the Bomgar Appliance hostname.

  4. Click Save Changes and then Save the script at the bottom of the page.
  5. Test the script as described in the testing section of this guide.

Bomgar Team (Optional)

Using the above setup steps, the Bomgar session launched via the KACE script will appear in the default queue of the Bomgar console. For larger support organizations, this may not be advisable as it allows any and all logged-in reps in the Bomgar system to pick up the session and gain access to the associated machine.

It is possible to create a separate Bomgar support team in order to isolate the sessions from being accessed by any and all representatives in the Bomgar console. This allows the Bomgar administrator to control exactly which representatives have access to these sessions and which representatives do not by modifying the membership of the appropriate team in Bomgar.

This step is not necessary if there is no security requirement to isolate Dell KACE scripted sessions from being accessed by all the representatives in Bomgar. kace.bomgar.com users do not have access to Bomgar support team functionality, so they must use the default queue. This should not pose a serious security risk since kace.bomgar.com does not support a team of more than 2 simultaneous users at a time.

  1. Add a Bomgar team and issue for KACE-scripted sessions.

    Note: If a team already exists for KACE-scripted sessions, skip adding a new team. Alternatively, it may be desirable to create multiple teams, each with its own Bomgar session script.

    • Log into the Bomgar /login web interface as an admin and browse to Configuration > Support Teams.
    • Click Add New Team, assign it a name, then add users and configure any other settings as necessary. Once done, click Add Team.
    • Click Issues and click Add New Support Issue. Add a description (e.g., Dell KACE Script), select the team in the Route To dropdown, and click Add Support Issue.
  2. Add the issue id to the KACE vbs script.
    • Open the InitiateBomgarSession.vbs script with a text editor, locate WScript.Arguments(0) on line 14 and paste over it with: "https://bomgar.example.com/api/start_session.ns?issue_menu=1&id=x" where bomgar.example.com is the URL of the Bomgar Appliance.
    • Copy the following URL into the address bar of a browser: https://bomgar.example.com/api/command.ns?username=admin&password=password&action=get_support_teams
    • Replace bomgar.example.com with the URL of the Bomgar Appliance, admin with the username of an admin user for the site, and password with the password of the given admin.
    • Load the page using the URL as modified above, copy the issue id for the desired Bomgar team, and paste this id number over the x at the end of the Bomgar Appliance URL in the vbs script.
    • Log into the KACE /admin interface, browse to Scripting, and click the name of the Bomgar session script.
    • Scroll to the Dependencies, remove the existing vbs script, and upload the new one. If the script is not to be used for Mac OS X systems, save the KACE script at the bottom of the page, and skip to the testing phase.
  3. Add the issue id to the KACE sh script.
    • Open the Bomgar session script in KACE, scroll to the Task section for Mac OS X, and edit the Launch task in the On Success section.
    • Focus the Parameters text box and append &id=x to the end such that the result is similar to: https://bomgar.example.com/api/start_session.ns?issue_menu=1&id=x.
    • Replace x with the issue id of the appropriate team as described in the vbs script configuration steps.

      Note: Depending on the preferred workflow, it may be desirable to use a separate team for Mac OS X sessions, or it may be desirable to use one team for all KACE-scripted sessions.

      Save the task changes and then save the script at he bottom of the page.

  4. Test the session script.
    • Log into the KACE /admin interface, browse to Scripting > Run Now, and select the Bomgar session script from the Script dropdown.
    • Focus the Devices text box and add one or more Windows machines. Do the same with one or more Mac OS X machines, if these are to be supported.
    • Click Run Now and log into the Bomgar representative console with a user account that is a member of the Bomgar teams configured to receive KACE-scripted sessions.

If the script is working correctly, the new session(s) should appear in the queue of the team(s) for which the KACE scripts (sh and/or vbs) were configured. If this is not the case, re-check the id numbers in the script URLs against the result of the get_support_teams API command URL.