/build/static/layout/Breadcrumb_cap_w.png

How do I run interactive shell scripts in case?

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

Answers (2)

Posted by: chucksteel 5 years ago
Red Belt
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.

Posted by: isudothings 4 years ago
Senior Purple Belt
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"

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ