/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


How do I run interactive shell scripts in case?

11/21/2019 124 views

I run a lot of shell scripts that are interactive meaning I ask for input from the user running them. For example if I want to accept input like a user or machine name in a script how do I do this in Kace.  Also, I am unfamiliar with KScript if it needs to be a KScript (Online or Offline).  Any help would be appreciated. 


Thank you

0 Comments   [ + ] Show comments

Comments



Community Chosen Answer

1

KACE scripting isn't designed for interactivity, so you are quite limited in that regard. If you already have scripts that take input and perform actions, then the only thing that the scripting module gets you is a way to launch the scripts on the client computer. Your KACE script should then be configured to run as the local user on the system (default is to run in the system context). 

As far as the difference between offline and online KScripts I would recommend reading the Administrator Guide section on scripts:
https://support.quest.com/technical-documents/kace-systems-management-appliance/10.0%20common%20documents/administrator-guide/153#TOPIC-1224457

If you have specific questions afterwards, please post them.

Answered 11/22/2019 by: chucksteel
Red Belt

All Answers

0

Configure the script to run as an <Online Shell Script> then ensure it's running under the "current user" context, so that the console window appears for that user.


You can use Read-Host to accept user input and store as a variable.


$ComputerName = Read-Host "Please provide a  computer name"

Answered 12/05/2019 by: isudothings
Senior Purple Belt