Kaseya Community

Write file from "get file" back to Agent

This question is not answered

I can't find the way to do this, but am very surprised if you can't.

I'm using the "get file" function to back up some settings in an XML file to the Agent's file stash on the Kaseya server. I want to write a second procedure to copy the settings file back to the agent and then use it to restore the settings. I can't work out how to do this from the Agent's files rather than the VSA Shared Files.

I did find some very old posts saying to prepend the file path with ..\..\UserProfiles  but this was removed a while ago for security reasons (and rightly so!)

All Replies
  • Do you have a Kaseya Agent on your VSA? You could possibly use the "writeFileFromAgent" function instead of "writeFile"

    function: writeFileFromAgent

    source agent: [your-VSA-server]

    source path (get-file location of your target agent): C:\Kaseya\UserProfiles\#vMachine.agentGuid#\GetFiles\Your.XML

    source path (Docs location on your target agent): C:\Kaseya\UserProfiles\#vMachine.agentGuid#\Docs\Your.XML

    target path: [your target path]