My Batch File is the following:DNS.bat
net stop "Umbrella Roaming Client"ipconfig /renewnet start "Umbrella Roaming Client"ipconfig /allI would like to be able to run this on the machines we have Kaseya installed on. For an absolute beginner, can you point me to a good resource, or walk me through how to set this up?
So far, I have found
Agent Procedures -> Installer Wizards -> Application Deploy
and have uploaded my batch file to a shared directory.
Am I going in the right direction?
This is what I have. No batch file required
Buster, Asmith, what area are you getting these screen caps from? My VSA shows:
They are in the Agent Procedures -> Schedule/Create tab. The "System" folder will be accessible from there.
Good start with the bat file. You’ve got it uploaded. Now just tie it into a procedure. Use the “executeshellcommand” to run the bat file in the procedure… that’s about all you need to do based off the information you’ve given me. You may think execute file would do the job (or maybe that was just me when I first started) but it doesn’t. Executeshellcommand will be your very best friend.
Not sure what you expect to accomplish with the ipconfig /all at the end when using it as a procedure. If you want to save it, change that part so that it forwards the output into a log file.
Ipconfig /all > c:\kworking\dnsflush.log
Now you have two options for how to read the log file.
You can have the log file emailed to you by stuffing the contents into a variable (GetVariable(FileContent)) and using that in the body of the email (SendEmail()).
You can have it saved as a downloadable file to the agent by using GetFile. This is nifty if you have reoccurring tasks running that you want to track over a timeframe. Or you can just have it overwrite the previous. Pretty cool function imo.
If you only kick off the script when needed, then I would use the email one. Use the Kaseya variable for the admins email (#adminDefaults.adminEmail#), this will send the email to whoever runs the procedure. Of course they need an email associated with their account though.
Hope that helps! I know I struggled a lot with figuring out the do’s and don’ts with Kaseya. The community is uber helpful. Last note on procedures, don’t make them long. When you start rockin out procedures, if they start getting long, replan them so you can break them into different steps. Have one trigger the next basically. Reduces the odds of running into STUPID logic bugs. Had a procedure keep telling me 2+2=1 but I took that same chunk, put it in a different procedure and it worked how it should.. no idea why. Also, chunkin it out will improve your efficiency at debugging and decrease the likelihood of the procedure timing out. Yes, procedures can time out so beware of large downloads within procedures.
Kay, class dismissed