Kaseya Community

Monitoring Saved Files to Local Drive

  • Has anyone figured out a way to create a monitor set that monitors and logs any .doc, .xls, .pdf etc file type that is written to a given local drive? We're looking for an easy way to run a report to show which users are saving documents to their local drives rather than to network shares.

    Legacy Forum Name: Monitoring Saved Files to Local Drive,
    Legacy Posted By Username: rellers
  • I use these(this) script (2 parter) to scan for files, you should be able to modify them to do your bidding...

    This will produce a document that will be uploaded via get file...
    If you want a "report" I would modify it so that it writes a script log entry and run a report off of that.


    Script 1 of 2

    Script Name: Search Unwanted Files on PC 1-2
    Script Description: Search for all . MP3, .AVI, .MPG, .MPEG, .DIVX, files on your system

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : AgentTemp
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Search for unwanted files started.
    OS Type : 0
    Execute Shell Command
    Parameter 1 : for %a in (C D E) do if exist %a:* for %b in (mp3 avi mp4 m4a m4p divx) do dir %a:\*.%b /s /a /b>>>>"#AgentTemp#"\files.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : type #AgentTemp#\files.txt|find /c ":" >>"#AgentTemp#"\files.count
    Parameter 2 : 1
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #AgentTemp#\files.count
    Parameter 3 : files
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Number of unwanted files found: #files#
    OS Type : 0
    Execute Script
    Parameter 1 : Search Unwanted Files on PC 2-2 (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 :
    Parameter 3 : 0
    OS Type : 0
    Get File
    Parameter 1 : #AgentTemp#\files.txt
    Parameter 2 : FileSearch\UnwantedFiles.txt
    Parameter 3 : 1
    OS Type : 0
    Delete File
    Parameter 1 : #AgentTemp#\files.txt
    OS Type : 0
    Delete File
    Parameter 1 : #AgentTemp#\files.count
    OS Type : 0
    ELSE


    Script 2 of 2

    Script Name: Search Unwanted Files on PC 2-2
    Script Description: Search for all. MP3, .AVI, .MPG, .MPEG, .DIVX, files on your system

    IF Check Variable
    Parameter 1 : #files#
    > :0
    THEN
    Write Script Log Entry
    Parameter 1 : There where #files# unwanted files found.
    OS Type : 0
    ELSE
    Write Script Log Entry
    Parameter 1 : No unwanted files detected.
    OS Type : 0


    P.S. I didn't create this script, but I can't remember who did... Props to the OP?

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty