Chat now with support
Chat with Support

KACE Systems Management Appliance 12.1 Common Documents - KACE Service Desk Administrator Guide

About the KACE Service Desk Getting started
Configuring the appliance
Requirements and specifications Power-on the appliance and log in to the Administrator Console Access the Command Line Console Tracking configuration changes Configuring System-level and Admin-level General Settings Configure appliance date and time settings Review and configure user notifications Enable Two-Factor Authentication for all users Verifying port settings, NTP service, and website access Configuring network and security settings Configuring Agent settings Configuring session timeout and auto-refresh settings Configuring locale settings Configuring the default theme Configure data sharing preferences About DIACAP compliance requirements Configuring Mobile Device Access Enable fast switching for organizations and linked appliances Linking Quest KACE appliances Configuring history settings
Setting up and using labels to manage groups of items Configuring user accounts, LDAP authentication, and SSO Deploying the KACE Agent to managed devices Using Replication Shares Managing credentials Configuring assets
About the Asset Management component Using the Asset Management Dashboard About managing assets Adding and customizing Asset Types and maintaining asset information Managing Software assets Managing physical and logical assets Maintaining and using manual asset information Managing locations Managing contracts Managing licenses Managing purchase records
Setting up License Compliance Managing License Compliance Setting up Service Desk Configure the Cache Lifetime for Service Desk widgets Creating and managing organizations Importing and exporting appliance resources
Managing inventory
Using the Inventory Dashboard Using Device Discovery Managing device inventory
About managing devices Features available for each device management method About inventory information Tracking changes to inventory settings Managing inventory information Finding and managing devices Registering KACE Agent with the appliance Provisioning the KACE Agent Manually deploying the KACE Agent Using Agentless management Adding devices manually in the Administrator Console or by using the API Forcing inventory updates Managing MIA devices Obtaining Dell warranty information
Managing applications on the Software page Managing Software Catalog inventory
About the Software Catalog Viewing Software Catalog information Adding applications to the Software Catalog Managing License assets for Software Catalog applications Associate Managed Installations with Cataloged Software Using software metering Using Application Control Update or reinstall the Software Catalog
Managing process, startup program, and service inventory Writing custom inventory rules
Deploying packages to managed devices
Distributing software and using Wake-on-LAN Broadcasting alerts to managed devices Running scripts on managed devices Managing Mac profiles Using Task Chains
Patching devices and maintaining security
Using the Security Dashboard About patch management Subscribing to and downloading patches Creating and managing patch schedules Managing patch inventory Managing Windows Feature Updates Managing Dell devices and updates Managing Linux package upgrades Maintaining device and appliance security
Using reports and scheduling notifications Monitoring servers
Getting started with server monitoring Working with monitoring profiles Managing monitoring for devices Working with alerts
Using the Service Desk
Configuring Service Desk Using the Service Desk Dashboard Managing Service Desk tickets, processes, and reports
Overview of Service Desk ticket lifecycle Creating tickets from the Administrator Console and User Console Creating and managing tickets by email Viewing tickets and managing comments, work, and attachments Merging tickets Using the ticket escalation process Using Service Desk processes Using Ticket Rules Run Service Desk reports Archiving, restoring, and deleting tickets Managing ticket deletion
Managing Service Desk ticket queues About User Downloads and Knowledge Base articles Customizing Service Desk ticket settings Configuring SMTP email servers
Maintenance and troubleshooting
Maintaining the appliance Troubleshooting the appliance
Appendixes Glossary About us Legal notices

Adding and editing scripts

Adding and editing scripts

You can add or edit scripts using the Administrator Console.

To add and edit scripts, do one of the following:

Token replacement variables

Token replacement variables

Use token replacement values to add variables to scripts. The following list shows the token replacement values that can be used in the XML of scripts. At run time, these variables are replaced on the device with the appropriate values.

Table 28. Token replacement values




This is the folder where any script dependencies for this script are downloaded to the client.

5.2 or higher: $(KACE_DATA_DIR)\kbots_cache\packages\kbots\xxx

5.1: $(KACE_INSTALL)\packages\kbots\xxx



Agent device's system directory.

Both are synonymous. Preferred: $(KACE_SYS_DIR).

Windows: C:\Windows\System32

Mac OS X: /

Linux: /




Agent device's primary Ethernet MAC address.

All are synonymous. Preferred: $(KACE_MAC_ADDRESS)



Agent's local IP address (corresponds with network entry of KACE_MAC_ADDRESS) (

Both are synonymous. Preferred: $(KACE_IP_ADDRESS)


Combination of server, port, and URL prefix. (


Hostname of appliance server. (kbox)


Port to use when connecting to the appliance server. (80/433)


Web protocol to use when connecting to the appliance server. (http/https)


Agent's copy of the setting from server's config page.



The unique Quest KACE ID assigned to this Agent.

Both are synonymous. Preferred: $(KACE_KUID)


Installation directory for the Quest KACE Agent and plugins.

For older Agents this is mapped to $(KACE_INSTALL).

Windows: C:\Program Files\Quest\KACE\ or C:\Program Files (x86)\Quest\KACE\

Mac OS: /Library/Application Support/Quest/KACE/bin

Linux: /opt/quest/kace/bin


Installation directory for executables, scripts, packages, and so on.

For older Agents this is mapped to $(KACE_INSTALL).

Windows Vista and later: C:\ProgramData\Quest\KACE\

Mac OS: /Library/Application Support/Quest/KACE/data

Linux: /var/quest/kace


Substitutes the version number of the installed Agent. "5.2.12345".

5.2 or higher only.


Substitutes the architecture of the installed Agent. "x86/x64".

5.2 or higher Windows only.


Substitutes the architecture of the physical hardware. "x86/x64".

5.2 or higher Windows only.


Substitutes Windows, Mac, or Linux depending on the operating system of the Agent-managed device.

5.2 or higher only.


Substitutes x86 or x64 depending on the installed version of Microsoft Windows.

5.2 or higher Windows only.

Add offline KScripts, online KScripts, or online shell scripts

Add offline KScripts, online KScripts, or online shell scripts

You can add KScripts, specify the devices on which you want to run the scripts, and schedule scripts to run as needed.

Offline and online KScripts include one or more tasks. Within each Task section, there are Verify and Remediation sections where you can further define the script behavior. If a section is blank, it defaults to Success.

Go to the Script Detail page:
Log in to the appliance Administrator Console, https://appliance_hostname/admin. Or, if the Show organization menu in admin header option is enabled in the appliance General Settings, select an organization in the drop-down list in the top-right corner of the page next to the login information.
On the left navigation bar, click Scripting, then click Scripts.
Select Choose Action > New.
In the Configure section, specify script settings:




A meaningful name for the script that distinguishes it from others on the Scripts list.

TIP: You can enable or disable one or more scripts on the Scripts page. To do that, select them in the table, click , then click Enable or Disable, as required.


Whether the script is enabled to run on the target devices. Do not enable a script until you are finished editing and testing it and are ready to run it. Enable the script on a test label before you enable it on all devices.


The script category. Choose an existing category from the drop-down list, or click New Category to add a category. If you do not to assign a category to this script, ensure this field is set to None.

TIP: You can assign a category to one or more scripts on the Scripts page. To do that, select them in the table, click Choose Action > Category, then select a category in the list.


The script type. Script types include:

Online KScripts: Scripts that run only when a target device is connected to the appliance. Online KScripts run at scheduled times based on the appliance clock. You can create these scripts using the scripting templates.
Offline KScripts: Scripts that run at a scheduled time, based on the target device’s clock. These scripts can run even when target devices are not connected to the appliance, such as when devices start up or when users log in. You can create these scripts using the scripting templates.
Online shell scripts: Scripts that run at scheduled times based on the appliance clock, but that run only when the target device is connected to the appliance. Online shell scripts are created using simple text-based scripts, such as Bash, Perl, batch, and so on, that are supported by the target device’s operating system. Batch files are supported on Windows, along with the different shell script formats supported by the specific operating system of the target devices. PowerShell scripts are also supported on Windows-based target devices.
IMPORTANT: You must ensure the proper file extension is associated with the script to enable it to run on the target OS. For example, you can run .sh scripts on Mac and Linux devices, and .ps1 PowerShell scripts on Windows devices.


Whether the script is in development (Draft) or has been rolled out to your network (Production). Use the Template status if you are building a script to use as the basis for future scripts.


(Optional) A brief description of the actions the script performs. This field helps you to distinguish one script from another on the Scripts list.


Any additional information you want to provide.

In the Deploy section specify deployment options:



All Devices

Deploy to all devices. Clear the check box to limit the deployment to specific labels or devices.


Limit deployment to devices that belong to specified labels. To select labels, click Edit, drag labels to the Limit Deployment to window, then click Save.

If you select a label that has a Replication Share or an alternate download location, the appliance copies digital assets from that Replication Share or alternate download location instead of downloading them directly from the appliance.


Limit deployment to one or more devices. To find devices, begin typing in the field.

Operating Systems

The operating systems on which the application runs. Applications are deployed only to devices with the selected operating systems.

Click Manage Operating Systems.
In the Operating Systems dialog box that appears, select the OS versions in the navigation tree, as applicable.

You have an option to select OS versions by their family, product, architecture, release ID, or build version. You can choose a specific build version, or a parent node, as needed. Selecting a parent node in the tree automatically selects the associated child nodes. This behavior allows you to select any future OS versions, as devices are added or upgraded in your managed environment. For example, to select all build current and future versions associated with the Windows 10 x64 architecture, under All > Windows > Windows 10, select x64.

Specify Windows Run As settings (for online shell scripts and KScripts that run on Windows devices only):



Local System

Run the script with administrative privileges on the local device. Use this setting for all scripts created with a template.

Logged-in user

Run the script as the user who is logged in to the local device. This affects the user’s profile.

All logged-in users

Run the script once for every user that is logged in to the device. This affects the profiles of all users.


Run the Online Shell Script and KScripts in the context of credentials that are specified here. Select existing credentials from the drop-down list, or select Add new credential to add credentials not already listed.

See Add and edit User/Password credentials.

In the User Notify section, specify user alert settings. Alerts are available only for online KScripts and online shell scripts on Windows and Mac devices running the KACE Agent version 5.1 and higher:



Alert User Before Run

Allow the user to run, cancel, or delay the action. This is especially important when reboots are required. If no user is logged in, the script runs immediately.


Options presented to the user in the alert dialog (available when you select Alert user before run):

OK: Run immediately.
Cancel: Cancel until the next scheduled run.
Snooze: Prompt the user again after the Snooze Duration.

If the time specified in the Timeout elapses without a user response, the script runs at that time.

Interaction with Run As:


The amount of time, in minutes, for the dialog to be displayed before an action is performed. If this time period elapses without the user pressing a button, the appliance performs the action specified in the Timeout drop-down list.

Timeout Action

The action to be performed when the Timeout period elapses without the user choosing an option.

Snooze Duration

The amount of time, in minutes, for the period after the user clicks Snooze. When this period elapses, the dialog appears again.

Initial Message

The message to be displayed to users before the action runs.

To customize the logo that appears in the dialog, see Configure appliance General Settings without the Organization component.

In the Schedule section, specify run options:




Run in combination with an event rather than on a specific date or at a specific time.

Every n hours

Run at a specified interval.

Every day/specific day at HH:MM

Run daily at a specified time, or run on a designated day of the week at a specified time.

Run on the nth of every month/specific month at HH:MM

Run on the same day every month, or a specific month, at the specified time.

Run on the nth weekday of every month/specific month at HH:MM

Run on the specific weekday of every month, or a specific month, at the specified time.


Run according to a custom schedule.

Use standard 5-field cron format (extended cron format is not supported):

Use the following when specifying values:

Spaces ( ): Separate each field with a space.
Asterisks (*): Include the entire range of values in a field with an asterisk. For example, an asterisk in the hour field indicates every hour.
Commas (,): Separate multiple values in a field with a comma. For example, 0,6 in the day of the week field indicates Sunday and Saturday.
Hyphens (-): Indicate a range of values in a field with a hyphen. For example, 1-5 in the day of the week field is equivalent to 1,2,3,4,5, which indicates Monday through Friday.
Slashes (/): Specify the intervals at which to repeat an action with a slash. For example, */3 in the hour field is equivalent to 0,3,6,9,12,15,18,21. The asterisk (*) specifies every hour, but /3 restricts this to hours divisible by 3.


View Task Schedule

Click to view the task schedule. The Task Schedule dialog box displays a list of scheduled tasks. Click a task to review the task details. For more information, see View task schedules.

In the Schedule Options section, select the applicable options.



Also run once at next device checkin (for offline KScripts only)

Runs the offline KScript once when new scripts are downloaded from the appliance.

Also Execute before login (for offline KScripts only)

Runs the offline KScript when devices start up. This might cause devices to start up more slowly than normal.

Also Execute after login (before desktop loads) (for offline KScripts only)

Runs the offline KScript after users enter Windows login credentials.

Allow run while disconnected (for offline KScripts only)

Allows the offline KScript to run even if the target device cannot contact the appliance to report results. In such a case, results are stored on the device and uploaded to the appliance during the next connection.

Allow run without a logged-in user

Allows the script to run even if a user is not logged in. To run the script only when the user is logged in to the device, clear this option.

Run on next connection if offline

For online KScripts or Shell Scripts, this option enables the script to run on offline machines when they become online again.

When a script runs, it calculates the number of machines it is supposed to run on based on their labels, or their operating systems, or by manually identifying selected machines. Given that set of machines, the script then determines which of those machines are currently online, and then queues up a task for the online machines in the Konductor.

When you select this option, the script skips the step that identifies online machines and it runs on the online machines. For the offline machines, the task is added to the Konductor's queue, and it runs when those machine become online.

Any subsequent tasks for running the same script (for example, for an offline machine that already exists in the Konductor's queue) overwrite the existing tasks, so there can never be more than one task in the Konductor's queue for the same machine.

Having a high number of tasks in the Konductor may affect the appliance's performance, so the best practice is to use offline scripts for those machines that are typically offline, and only use this option with online scripts when the target machines are expected to be online, to avoid an overpopulating the Konductor's queue.

By default, this option is disabled.

In the Dependencies section, click Add new dependency.
Click Browse or Choose File.

Repeat this step to add dependencies as needed.

Online or Offline KScripts only. In the Tasks section, click New Task to add a task.
In the Policy or Job Rules section, specify the following settings for Task 1:




Enter the number of times the appliance attempts to run the script.

If the script fails but remediation is successful, you might want to run the task again to confirm the remediation step. To do this, set the number of attempts to 2 or more. If the Verify section fails, the script runs the number of times specified in this field.

On Failure

Select Break to stop running upon failure.
Select Continue to perform remediation steps upon failure.
In the Verify section, click Add to add a step, then select one or more steps to perform.
In the On Success and Remediation sections, select one or more steps to perform.
In the On Remediation Success and On Remediation Failure sections, select one or more steps to perform.
TIP: To remove a dependency, click the Delete button next to the item: . This button appears when you mouse over an item.
TIP: Click the Edit button next to Policy or Job Rules to view the token replacement variables that can be used anywhere in the script: . The variables are replaced at runtime with appropriate values.
Online shell scripts only. In the Script section, specify the following settings:



Script Text

Type the script contents.

Script File Name

Enter the name and extension of the file that will contain the specified script.

IMPORTANT: You must ensure the proper file extension is associated with the script to enable it to run on the target OS. For example, you can run .sh scripts on Mac and Linux devices, and .ps1 PowerShell scripts on Windows devices.

Timeout (minutes)

Specify the maximum number of minutes the script can run on the target device.

Upload File

If the script creates a file, and you want to upload that file to the appliance, select this option, and provide the following information:

Upload File Name: Enter the name of the file.
Upload File Directory Path: Specify the directory where you want to store the file. If you want to use the default script directory (<appliance_installation_directory>/scripts), leave this field blank.

Delete Downloaded Files

If the script requires any other files to run, such as installers, and you want to delete them after the script execution, select this option.

Click Run Now to immediately push the script to all devices.

Use this option with caution. See Using the Run and Run Now commands.

Click Save.

Edit scripts

Edit scripts

You can edit the three types of scripts: offline KScripts, online KScripts, and online Shell Scripts. You can also edit offline KScripts and online KScripts with the XML editor.

Scoped users can view the details of all scripts, but they can save changes only to those to scripts that affect the devices or labels that are associated with their scope. For more information about scoped users, see Add or edit User Roles.

Go to the Script Detail page:
Log in to the appliance Administrator Console, https://appliance_hostname/admin. Or, if the Show organization menu in admin header option is enabled in the appliance General Settings, select an organization in the drop-down list in the top-right corner of the page next to the login information.
On the left navigation bar, click Scripting, then click Scripts.
Display the Script Detail page by doing one of the following:
Select Choose Action > New.
To edit the raw XML of the script, scroll to the Schedule section, then click Edit XML.
Click Save.
Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating