Kaseya Community

Internet Usage Monitoring

  • I am looking for a script that will return the contents of any and all History folders on a computer to an email address.

    Using this I could in effect then feed inappropriate sites into the hosts file and redirect them to more benign sites (such as yahoo.com or disney.com)

    Tom Fehlberg

    TBK Consulting

    tom@tbkconsulting.biz


    Legacy Forum Name: Internet Usage Monitoring,
    Legacy Posted By Username: tom@tbkconsulting.biz
  • Hi Tom,

    I got one for you here:

    http://www.securemycompany.com/forum/viewtopic.php?t=37

    -Ed


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: bellcpa
  • That's very VERY close to what I need, but it's not quite it ... The script only returns the current user (the one logged on) history ... what I need is a script that will traverse all users for a particular machine's history. There could be as many as 15 different people logged onto these machines that I need to retrieve the history from ...

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: tom@tbkconsulting.biz
  • Very close but no cigar - this only returns the current user's history - I need every user's history file on these machines ... so I need something that can search the hard drive and return the contents of any folder named History.

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: tom@tbkconsulting.biz
  • I see what you mean. Here is another version of the script that returns history for multiple users:

    http://www.securemycompany.com/forum/viewtopic.php?t=38

    Just make sure none of your users bypasses the history by using a differentbrowser (eg. Firefox) Wink

    -Ed


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: bellcpa
  • PERFECT! Exactly what I needed ...

    Thank You!


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: tom@tbkconsulting.biz
  • That's a great script!

    I can't get it to work in Step 5 as System...I have to set it to Execute as User or else I get a blank email (except of the header lines).

    Any ideas?


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: jedmonds
  • Hmm, interesting... seems like its a permissions issue although the system account should normally have the privileges to run the script. Check the permissions on the

    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    registry key and subkeys just in case. System account should have read access.

    Also, do you get lines in the email that read:

    PROFILE PATH:

    or just the "USER URL ADDRESS..." top header?

    -Ed


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: bellcpa
  • Just the "USER URL..." top header.

    System account appears to have all the right permissions.

    I agree...it's a bit bizarre.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: jedmonds
  • In that case something might not be right with WMI access. I have modified the iehistory2.vbs script to do some error handling and return errors viaemail.

    Download the new script from:

    http://www.securemycompany.com/forum/viewtopic.php?t=38

    change the extension to .vbs and replace the old version onyour server

    This should provide some clues as to why you cannot run it as system.

    -Ed


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: bellcpa
  • With the new script, it now works...no errors.

    Is this what you expected?

    Thanks.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: jedmonds
  • Not really, all I did was add error handling for WMI-based operations. But they would allow the script to continue running after logging the error(s) instead of just stopping prematurely as with unhandled errors.

    Were there any errors in the email?


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: bellcpa
  • No, no errors.

    Weird.

    I'll try it on some more computers and see how it goes.

    Regards,

    John


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: jedmonds
  • Is this missing some of the script? http://www.securemycompany.com/forum/viewtopic.php?t=38
    There is no variable before then and no End If at the end? Is there more that I'm missing?

    Thanks,

    Tom


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: tdouglas@jmark.com
  • Hmm, are you referring to the attached vbscript (iehistory2) or the script listed directly in the forum post?

    The posted script is a Kaseya script (not vbscript) and does not require a variable before THEN or "End If".

    As far as I know everything is syntactically correct and the script works as expected.

    -Ed


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: bellcpa