Kaseya Community

First Script Attempt: Refresh DNS

This question is not answered

My Batch File is the following:

DNS.bat

net stop "Umbrella Roaming Client"
ipconfig /renew
net start "Umbrella Roaming Client"
ipconfig /all

I 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?

Thanks!

-Dave

All Replies
  • This is what I have. No batch file required



    added picture
    [edited by: Buster Davis at 5:44 AM (GMT -7) on Aug 8, 2018]
  •  

  • Buster, Asmith, what area are you getting these screen caps from?  My VSA shows:

    Agent

    Agent Procedures

    Audit

    Desktop Management

    Discovery

    Info Center

    Monitor

    Network Monitor

    Patch Management

    Policy Management

    Remote Control

    Software Deployment

    Software Management

    System

    vPro

    Webroot



    forgot 1 poster
    [edited by: davidp at 1:57 PM (GMT -7) on Aug 8, 2018]
  • 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.

    Variables

    community.kaseya.com/.../11113.aspx

    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