Kaseya Community

Script to "refresh" the kaseya client from the local machine

  • ok, I was thinking of a simple scenario. Here are the parameters.

    1. The "client" is currently showing offline.

    2. If we reboot the machine the client will show "online".

    3. The client is currently not available for whatever reason, but will be available later. Let's pretend that its Friday afternoon, and the "client" is currently not available, but you will need to access it over the weekend.

    ____________________________________________________________________

    ok. I want to know if someone knows the command line structure of the actual Kaseya client agent....?

    I want to write a script that will force a refresh of the computer at predeterminded times. I will also be putting in some reboot logic as well, in case it is needed.

    Ultimately I want to make the computer check in to KServer, then notify me via email that it did so, so that I do not have to refresh the screen, and/or check in countless times looking for the computer to come online.



    So to repeat what I am looking for as a first step.... Does anyone know the command line syntax to the kaseya agent...? I guess the name of the actual taget is "agentmon.exe".

    Gamer-X


    Legacy Forum Name: Script to "refresh" the kaseya client from the local machine,
    Legacy Posted By Username: Gamer-X
  • How are you going to get these commands to the clients if they are offline?

    It's the old snake eating it's tail - if the machine was online you could send it a command, but it's offline, so i'll send it a command to get it online, but I can't send it a command, because it's offline...

    If the machine could except a command, (even from the agent at a command line) why would it not be checking in?


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: raybarber
  • I planned upon moving the script ahead of time to the system. Obviously, this is not intended to get your tail out of a sling, but more of a ..." I know I am going to be working on "x" systems this weekend. I need to make sure all are connected with no hassles, since the office will be closed.



    Anyway, that was my train of thinking.

    Since posting, I have also been thinking of a vb logic script that would monitor the service state of agentmon.exe and stop and start it every "x" number of hours, regardless of what was going on...

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • I was also thinking of it as a way to be notified of a client asset coming online...

    that I have been trying with out much luck to catch at an opportune time. That is why I was thinking about the email notification portion of the script.

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • Under Monitor->Alerts you will find the Agent Status alert that will let you know when a machine comes online.

    You shouldn't need a VB script to get the agent running, it's running as a system service, so as long as the machines are switched on and have an internet connection you will always be able to manage them.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: raybarber
  • you are right. I was talking to Kaseya Tech Support on the phone and they told me basically the same thing.

    It seems that currently, the only way to manually refresh the service is to stop and restart the service.



    Thanks for your help Raybarber. I appreciate it.

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • No problem! Glad to help.

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: raybarber
  • Gamer-X wrote:
    ok, I was thinking of a simple scenario. Here are the parameters.

    1. The "client" is currently showing offline.

    2. If we reboot the machine the client will show "online".

    3. The client is currently not available for whatever reason, but will be available later. Let's pretend that its Friday afternoon, and the "client" is currently not available, but you will need to access it over the weekend.



    First Up: if you've got machines that have offline clients (even though the machine is powered up and 'working') you've got bigger problems. Either the client is closing the Agent (did you disable the exit option from the menu?), they're stopping the Kaseya Service (smacked bottom for the user) or you've got a software/hardware conflict (run Smile).

    Lock down the client, so that they can't exit it, disable remote control or do anything other than look at the pretty icon. Or be really mean, and don't let them even look at the icon.

    If you're still having issues, then you might want to think about setting up a batch file that is executed at {time} each {interval} and you will be assured that you have a connectable client. I had issues a while back relating to the network driver + Microsoft Firewall Client, so I restart the Kaseya service at 8:00am each morning, or when the PC is turned on.

    --
    Anthony



    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Anthony Michaud