Running a Script for Automox via Kace
I am trying to register Automox on our servers using a Kace script and I can't get it to work. Also in the script I have to include stopping the agent and starting the agent. This is my first attempt at running a script in Kace.
Here are the lines needed:
C:\Program Files (x86)\Automox\amagent.exe“ --setkey <NEW_ORGANIZATION_ACCESS_KEY>
net stop amagent
net start amagent
How can I get this going?
This should be fairly straight forward.
Before you begin I recommend putting those lines into a local batch file (.bat) and running it on a test machine as an administrator. Make sure you code works before creating the Kace script.
Create a new script in Kace under Scripting/Scripts.
- Name it and enable it
- Type is Online
- Make sure you select the Operating Systems of your computers.
- Important---at first select a test device in the "Devices" window. You want to test this before selecting all or multiple computers.
- I usually run as Local System
- Scroll down to Tasks and click New Task
- Under "On Success" click the plus sign and select "Run a batch file..."
- Name your script (doesnt really matter)
- Put your commands in the "Batch file:" dialog box
- You can make it visible for testing, but it is not necessary.
- Important -- Click "Save Changes" you need to save the batch file before saving the script
- Click Run Now to save and run the script or click Save
Once the script is saved you can go back in and edit, or run the script from the Run Now. Just remember each time to select your computers and also when you change the batch file, it must be saved independently from the script.
Here is a knowledge base article that explains scripting...