Kaseya Community

What is the COOLEST thing you've done with Kaseya?

  • client had 7 laptops stolen....we brought in loaners and restored to dissimilar hardware the next day (Saturday! ugh!) and by noon they were working (CPA firm during tax season). their Dell laptops came a week later and imaged them again and viola - didn't miss a beat except they couldn't take their PC home. needless to say THEY LOVE US LONG TIME!

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: mmancini
  • lowray1975
    I created a script and exe combination that will download and install all of those patches that Kaseya cannot perform.

    I know this could have been accomplished by creating a custom script for each and every download, but this way just seems much easier to me. Pass the download path and command variables and it just works on it's own!

    I think it's great! Stick out tongue

    let me taste of your sweet scripty nectar.
    aklein@intellicomp.us

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: aklein
  • aklein
    let me taste of your sweet scripty nectar.
    aklein@intellicomp.us


    Eek

    I dont know what else to say.

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: Interprom
  • Come on Josh, Be sure to share with me as well. I know you know my email. Smile

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: cking@faylib.org
  • lowray1975
    I created a script and exe combination that will download and install all of those patches that Kaseya cannot perform.

    I know this could have been accomplished by creating a custom script for each and every download, but this way just seems much easier to me. Pass the download path and command variables and it just works on it's own!

    I think it's great! Stick out tongue

    Ditto please, that would be fantastic! chris@slashblue.com

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: fisofo
  • Lmhansen
    Coolest thing (so far) would have to be my "defrag everything" script, which defrags all physical drives on the computers if needed, then e-mails me the logfile so I can verify the results. More VBS that Kaseya, but we couldn't do one without the other.

    care to post this?

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: fisofo
  • Please share, i have only managed to get as far as downloading all manual patchs to the client sites and then writing an individual script for each patch.
    daniel@it-serve.com

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: Dan_Barclay
  • lowray1975
    The problem with sharing is that stupid upload limit Sad

    Any chance to get a copy, it would be great, banging my head on some of the scripting.Big Smile


    gdoubinin@badgercomputers.com

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: gdoubinin
  • I would love to have the patching script as well.

    ed@kineticnetworking.com

    Thank you!

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: edavis
  • Defrag everything


    dim loggit_logfilename, loggit_fso, loggit_silent

    If WScript.Arguments.Count = 0 Then
    WScript.Echo "Usage: CScript filename.vbs argument1 argument2 ...."
    WScript.Quit
    End If

    logfile = WSCript.Arguments(0)

    loggit_silent = true ' log file only or with MsgBox/Echo
    set loggit_fso = CreateObject("Scripting.FileSystemObject")
    strSearch = "You do not need to defragment this volume."

    Set WshShell = WScript.CreateObject("WScript.Shell")
    Dim fso, d, dc
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set dc = fso.Drives
    For Each d in dc
    If d.DriveType = 2 Then
    loggit "Analyzing drive " & d

    Set objWshScriptExec = WshShell.Exec("defrag.exe " & d & " -a")
    strOutput=objWshScriptExec.StdOut.ReadAll
    loggit strOutput
    If InStr(1, strOutput, strSearch) = 0 Then
    loggit "Defragmenting drive " & d
    Set objWshScriptExec = WshShell.Exec("defrag.exe " & d & " -f")
    strOutput=objWshScriptExec.StdOut.ReadAll
    loggit strOutPut
    End If

    End If
    Next
    Set WshShell = Nothing

    ' -=-=-=-=-=-=-=-=-=-
    sub loggit (msg)
    set stream = loggit_fso.OpenTextFile(logfile, 8, True)
    stream.writeline date & " " & time & ": " & msg
    stream.close
    if not loggit_silent then
    WScript.echo msg
    end if
    end sub


    kaseya script to run it:

    Script Name: Defrag - Defrag All
    Runs VBScript to defragment all fixed drives on system.

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : Agent
    OS Type : 0
    Delete File
    Parameter 1 : #Agent#\defrag.log
    OS Type : 0
    Write File
    Parameter 1 : #Agent#\defragall.vbs
    Parameter 2 : VSASharedFiles\Tools\defragall.vbs
    OS Type : 0
    Execute Script
    Parameter 1 : Defrag - Get Report step 2 (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 : 24
    Parameter 3 : 2
    OS Type : 0
    Execute Shell Command
    Parameter 1 : #agent#\defragall.vbs #agent#\defrag.log
    Parameter 2 : 0
    OS Type : 0
    ELSE


    Then pick up the log file


    Script Name: Defrag - Get Report step 2
    Script Description: Collects the defrag log file.

    IF True
    THEN
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : Machine
    OS Type : 0
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : Agent
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #Agent#\defrag.log
    Parameter 3 : DefragLog
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : #DefragLog#
    OS Type : 0
    Send Email
    Parameter 1 : your-email@yourdomain.com
    Parameter 2 : Notification: #Machine# Defragmentation report
    Parameter 3 : #DefragLog#
    OS Type : 0
    ELSE


    VBScript enumerates all drives, then analyzes all physical drives. If they come back with "you should defragment this drive", then it'll automatically defrag the drive, and repeat for next physical.

    The first Kaseya script just uploads the VBScript from the server and executes it with the name of the logfile as argument. It then schedules the "Get logfile" script to run 24 hours later. Defrag should be done by then.

    Careful running on huge arrays!

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: Lmhansen
  • lowray1975
    I created a script and exe combination that will download and install all of those patches that Kaseya cannot perform.

    I know this could have been accomplished by creating a custom script for each and every download, but this way just seems much easier to me. Pass the download path and command variables and it just works on it's own!

    I think it's great! Stick out tongue

    Any chance I can have it? It would make my day
    jsmspar@gmail.com

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: juan@geeksaknockin.com
  • Did anyone ever get a copy of this magical patch installing script?

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: Resistance2Fly
  • I uploaded the downstall script to my personal web site since I still cannot get around size limitations here.

    http://www.joshcook.net/

    Good luck!

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: lowray1975
  • lowray1975
    I uploaded the downstall script to my personal web site since I still cannot get around size limitations here.

    http://www.joshcook.net/

    Good luck!

    Great blog, Josh!

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: RCS-Michael
  • to the top

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: wayne@mithrax.com