You can add or edit scripts using the Administrator Console.
To add and edit scripts, do one of the following:
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) (http://kace.kbox.com:80). Both are synonymous. Preferred: $(KACE_IP_ADDRESS) | |
Combination of server, port, and URL prefix. (http://kace.kbox.com:80) | |
Port to use when connecting to the appliance server. (80/433) | |
Web protocol to use when connecting to the appliance server. (http/https) | |
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". | |
Substitutes the architecture of the installed Agent. "x86/x64". | |
Substitutes the architecture of the physical hardware. "x86/x64". | |
Substitutes Windows, Mac, or Linux depending on the operating system of the Agent-managed device. | |
Substitutes x86 or x64 depending on the installed version of Microsoft Windows. |
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.
1. |
a. |
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. |
b. |
c. |
2. |
A meaningful name for the script that distinguishes it from others on the Scripts list.
| |||||||||
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.
| |||||||||
The script type. Script types include:
| |||||||||
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. | |||||||||
3. |
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 OK. | |||||
Limit deployment to one or more devices. To find devices, begin typing in the field. | |||||
|
4. |
Specify Windows Run As settings (for online shell scripts and KScripts that run on Windows devices only): |
Run the script as the user who is logged in to the local device. This affects the user’s profile. | |||
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. |
5. |
In the User Notify tab, 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: |
Options presented to the user in the alert dialog (available when you select Alert user before run):
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. | |||||||||
The action to be performed when the Timeout period elapses without the user choosing an option. | |||||||||
The amount of time, in minutes, for the period after the user clicks Snooze. When this period elapses, the dialog appears again. | |||||||||
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. |
6. |
Run in combination with an event rather than on a specific date or at a specific time. | |||||||||||
Every n hours |
|||||||||||
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:
| |||||||||||
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. |
7. |
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 Run before login (for offline KScripts only) |
| ||
Also run once at next device checkin (for offline KScripts only) |
Runs the offline KScript after users enter Windows login credentials. | ||
Allow run while disconnected (for offline KScripts only) |
|||
a. |
b. |
c. |
NOTE: If the Replication Share is inaccessible, the dependencies are downloaded from the appliance. To enable this setting, select the Failover To Appliance check box on the Replication Schedule Detail page. See Create Replication Shares. |
Repeat this step to add dependencies as needed.
9. |
a. |
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. | |||||
|
b. |
c. |
d. |
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.
|
10. |
Enter the name and extension of the file that will contain the specified script.
| |||||
Specify the maximum number of minutes the script can run on the target device. | |||||
| |||||
◦ |
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. |
© ALL RIGHTS RESERVED. Términos de uso Privacidad Cookie Preference Center