RMM Integration and custom ticket body

This is a great product, and I've already included a ps1 to detect our RMM agent and install it if its missing. One of the other things we do with this is dump the Agent ID and status (last check in time, etc) into the report -however I would like to be able to have this added into the body of the ticket as well. With specific custom information being dumped into the ticket we can execute scripts against it to associate tickets to the computer for example. With Connectwise Manage, the Configuration Item of a CW Automate computer attached to ticket allows launching the computer directly from the ticket and allows us to track history of computer tickets much easier.


I'm thinking the way it works would be anything we wanted into the report should go to "*_appendreport.txt" and anything for the body would go  "*_.appendticket.txt". 

Comments

  • edited August 2019

    I think this is a great idea and I will be implementing it. Hopefully by the end of the week it will be available. I want to add to it though: "*_appendprivate.txt" will add a private note to the ticket for ticket systems that support that.

    But I think you are going to run into trouble trying to use this to install your RMM because the scripts would only be running with admin rights if the user was logged in as an admin and UAC was turned off, which is unlikely most of the time I think. For that reason, I am going to add another scripting option in the payload that will allow a custom script to be packaged with the MSI to run during install. This will always be guaranteed to run with elevated admin rights so it would be perfect for installing RMMs

  • Damn good catch, I didn't even think of running with admin rights for the RMM Installer!


    I've a neat powershell I just created here that can be used with any RMM to detect things

    So with this you can install the software automatically when it detects a button (WARNING) or create a ticket in the event the button goes missing (FAILED)

    # Remote Monitor to execute to complete the following tasks
    ## Return WARNING if the Button is detected and software NOT installed
    ## Return FAIL if the Button is NOT detected and software IS installed
    ## Return SUCCESS if the Button IS NOT detected and the Software is NOT Installed
    ## Return SUCCESS if the button IS detected and the software 
    $buttonStatus = if ((gwmi win32_keyboard) |?{$_.PNPDeviceID -like 'USB\VID_05AC&PID_020B*'}){"Help Desk Button Detected"} else {"No Help Desk Button Detected"}
    $applicationStatus = if (${env:ProgramFiles(x86)}) {Get-Item "${env:ProgramFiles(x86)}\Helpdesk Button"} else {get-item "$env:ProgramFiles\Helpdesk Button"}
    if (($buttonStatus -eq 'Help Desk Button Detected' -and $applicationStatus -ne $null) -or ($buttonStatus -eq 'No Help Desk Button Detected' -and $applicationStatus -eq $null)) {
        "SUCCESS"
    }
    elseif ($buttonStatus -eq 'No Help Desk Button Detected' -and $applicationStatus -ne $null) {
        "FAIL"
    }
    elseif ($buttonStatus -eq 'Help Desk Button Detected' -and $applicationStatus -eq $null) {
        "WARNING"
     }
    
    
    
  • Nice @mgreen! Thanks for sharing!

  • edited August 2019
Sign In or Register to comment.