Kaseya Community

How to post to "Agent > Documents"

  • Hi All,

    I'm hoping this isn't a lost cause, but I'm trying to figure out how to post a file to the Agent > Documents for a machine from within an Agent Procedure.


    I'm creating an AP to utilize HP's "HP Image Assistant" - so far so good.  It analyzes the machine, and installs updates, etc.  When the software is done running, it outputs results to an html file.  Putting the contents of that file into a variable and throwing that variable into the Procedure Log is useless as it's difficult to parse the html code, and there's more output than will actually display.  So I'd like to just take that html file and throw it into Agent Documents before deleting the file (and all other traces of the AP) from teh client machine.

    Is this possible in the way that I'm looking at it?

  • I don't know about that documents location, but right next to it is 'Get File' you can use the Get-File command in an agent procedure to pull your HTML file there.  Here is the documentation for that command help.kaseya.com/.../index.htm

    It's an easy one liner to point to the path you want to pull from.

  • GetFile is the way to go. You can even use the APIs to pull the uploaded document back to a central location or your workstation to manipulate it.

    There are also options within the getFile command to overwrite, not overwrite, and alarm on change.


  • To put something in the Documents tab you use the getfile() path of "..\Docs\<whatever>".  We do it all the time to place items into subfolders on the documents tab of our end-points.

    spelling correctiion
    [edited by: PedroPolakoff3 at 6:03 AM (GMT -7) on Apr 15, 2020]
  • Thanks folks!

    This is what I needed.  GetFile is the statement, and "..\Docs\[filename]" is  the KServer path for what I was looking for.

    Once I've completed testing, I'll post the AP on the Automation Exchange site if anyone is interested