Get File

NAVIGATION  Agent Procedures > File Transfer > Get File

The Get File page accesses files previously uploaded from a managed machine. Files can be uploaded to a machine-specific directory on the Kaseya Server using the getFile() or getFileInDirectoryPath() commands. Clicking the machine ID displays all uploaded files for that machine ID. Click the link underneath a file to display the file or run it.

NOTE   The files stored on the Kaseya Server using the getFile() command are machine-specific. Use Manage Files Stored on Server to access files stored on the Kaseya Server that are not machine-specific.

  • Each file is displayed as a link. Click any filename to access that file.
  • Remove files by clicking the delete icon next to the file.

Example 1: Checking Large Number of Managed Machines Simultaneously

Get File is designed to support automated checks on a large number of managed machines simultaneously.

NOTE   If all you want to do is get a file from a managed machine as a one-time event then Remote Control > FTP is the simplest way.

Use Get File in conjunction with an agent procedure to perform some automated task on a set of managed machines. For example, if you have a utility that reads out some information unique to your client computers you can write a procedure to do the following:

  1. Send the utility to the managed machine using either the writeFile() procedure command or theDistribute File page.
  2. Execute the utility using either the executeShellCommand() or executeFile() agent procedure command and pipe the output to a text file, such as results.txt.
  3. Upload the file to the Kaseya Server using the getFile() command.

Example 2: Comparing Versions of a File

As an option in the getFile() agent procedure command, existing copies of uploaded files can be renamed with a .bak extension prior to the next upload of the file. This allows you to examine both the latest version of the file and the previous version. For example, use the IF-ELSE-STEP agent procedure editor to create a simple getFile() agent procedure.

The first time the getFile() agent procedure command executes on a managed machine the agent sends c:\temp\info.txt to the Kaseya Server and the Kaseya Server stores it as news\info.txt. The second time getFile() agent procedure executes, the Kaseya Server renames the original copy of news\info.txt to news\info.txt.bak then uploads a fresh copy and saves it as news\info.txt.

Also as an option, an email alert can be sent when a change in the uploaded file has been detected, compared to the last time the same file was uploaded. The getFile() command must have either the Overwrite existing file and send alert if file changed setting or the Save existing version, get file, and send alert if file changed setting selected.

Example 3: Get File Changes Alerts

To perform continuous health checks on managed machines, run the agent procedure on a recurring schedule and activate a Get File Changes alert using Monitor > Alerts - Get Files. The VSA instantly notifies you of any changes to the results.

Troubleshooting Patch Installation Failures

When patch scan processing reports patch installations have failed, a KBxxxxxx.log (if available) and the WindowsUpdate.log are uploaded to the Kaseya Server. Additionally, for those patches that required an "Internet based install", a ptchdlin.xml file will be uploaded to the Kaseya Server. These files can be reviewed using Agent Procedures > getFile() for a specific machine and can help you troubleshoot patch installation failures. Info Center > Reporting > Reports > Logs > Agent Procedure Log contains entries indicating these log files have been uploaded to the Kaseya Server for each machine.