Kaseya Community

Need procedure to auto update kaseya agents.

  • We need a procedure to auto update all kaseya agents to latest version.

  • We utilize a couple of methods for keeping KAgents up-to-date.  We schedule the "Deploy Live Connect" (Agent Procedures -> Sample Procedures -> Agent Control) on a weekly basis.  We also schedule the "Update Agent" (Agent -> Upgrade Version) on all templates to ensure new agents are updated immediately.  Beyond that, I'm not aware of any method to auto update KAgents with the latest version of the agent software.  From our standpoint, we prefer to update our internal system agents first, to ensure there aren't any issues, and then we update our client's agents.

  • Thanks seftink,

    We are on the same page. On kaseya portal we have option to schedule "Update Agent" once. I want it run weekly / monthly. I don't  want to go and check which agents are out dated and do it manually each time.

  • I don't know of any way to do that, and in my opinion, it would be potentially dangerous to do so.

  • In this post swhansen has uploaded the procedure to do this.  Depending on the number of agents you have you could schedule regularly.  Otherwise you'll need to create a slightly more complicated procedure to check the version in the vAgentConfiguration.agentVersion and if it's not up to date then run the original procedure.

    I don't see any danger in doing this, completely the opposite really as up to date agents are always something that Kaseya support check so having them up to date is a no-brainer.

  • Alistair, Where is the uploaded procedure?

  • That uploaded procedure is blank. It is just one work "scheduleProcedure", it doesn't make seance to me.

  • I use this script when agents are having trouble loading live connect. You'll need to edit to reflect your agent working dir path. 

  • Agent update.zip

    Attached

  • Procedure Force Agent Update.xml

    My procedure attached.  Very simple but it works.  Providing that Kaseya don't reorder the procedures list.

  • Hey guys,

    The "Procedure Force Agent Update.xml" only pushes down the 2 batch files and those stop services and deletes the directory. How does this update the agent? Don't you not need to push down the actual agent update?

  • Hi,

    Below is XML that can be imported into the Agent Procedures->Schedule/Create folder tree that runs the same script that you schedule via the Agent-Update Agent function.  

    We do not recommend upgrading all agents automatically without some form of testing prior.  

    You could tie this agent procedure into a Policy Management policy and a View for all machines with "old agent versions" (using the Advanced Agent Data filter on Agent Version (i.e. < 6030019 for instance)). When a new agent version is released, say 6.3.0.20, you could test on certain machines first, and then if all appears well, you can then edit the View and change the Agent Version filter to < 6030020 and then the Policy would kick in and schedule the script to run say every 4 hours.  However once it runs, the agent version will not be < 6030020 and then the machine will fall out of the View and the scheduled agent procedure will be removed from the pending procedures for the agents that got upgraded already.

    <?xml version="1.0" encoding="utf-8"?>
    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
    <Procedure name="Run Now K-VNC 4.x Install" treePres="3" id="2063893464" folderId="444221172548933" treeFullPath="myProcedures - VSA-Admin">
    <Body description="Executes the System Agent Procedure &quot;K Agent Update&quot;.">
    <Statement description="Execute the specified procedure. - NOTE: this procedure does not complete until the called procedure completes." name="ExecuteScript" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="ScriptID" value="132" />
    <Parameter xsi:type="StringParameter" name="ScriptName" value="K Agent Update" />
    <Parameter xsi:type="StringParameter" name="TimeDelay" value="" />
    <Parameter xsi:type="EnumParameter" name="TimeUnit" value="Immediate" />
    </Statement>
    </Body>
    </Procedure>
    </ScriptExport>

    Regards,

    Matt Warburton

    Kaseya Professional Services

  • Would be great if there was some sort of indication on the 'Update Agent' page as to the latest version available so we could then use that in our scripts :)

  • Wow thank you very much Matt. That did the trick. And yes we have an exe I compiled from python that mines out the current version of install on the server along with the install on the machines. That is our check so we do not over install. If you guys want me to I would be happy to post up the python scripts even though they are pretty dirty scripts and take a bit of manipulation for your environment.

  • Nice work Matt, But when I import the xml and go to view the procedure, I see errors like this:

    executeProcedure("???", " ", "Immediate",...  and the property boxes are blank. Any ideas?