Kaseya Community

Simple agent procedures failing for one client

  • I have a procedure that launches a simple BAT file via command prompt to install an application. Works for other clients, not working for one. As a test, i tried a couple very simple scripts that are default samples in kaseya (like GPUpdate, for example), and it's failing as well. I did notice that if i schedule the gpupdate script to "run now", it sits for a couple+ of hours before failing, so it appears that it's just timing out. No clues in Event Viewer. Client is using same anti-virus as most (Webroot). For my application install BAT file, I did notice that the same script runs fine if i run it manually locally, so i know the script is good. UAC does prompt, but i am running the script as "system" to bypass that. Anyone have any reasons why even very simple scripts won't run? I've posted the gpupdate script and error below. Note that i do have UAC turned off now via GPO, but i'm waiting on the client to let me reboot servers to ensure it's taken effect. I really don't know if this is the issue, but that's my next step. As a kicker, this client has about 40 servers. If i select all servers and run GPupdate script, it works on 3 of them (both DCs and another random member server), which i find very odd. Fails on everything else. 

    Script: executeshellcommand("gpupdate /force", "Execute as System", "Windows 2019 / 2016 / 2012 / 2008", "Halt on Fail")    *Keep in mind, this works on 3 of the 40 servers for this client and every other server i have tested on at other clients, so the script is good. 

    Sample failure notes: 

    Windows GPUPDATE /FORCE 7:48:52 pm 25-Jun-19 Failed THEN in step 1 (Line 1)
    7:48:52 pm 25-Jun-19 Windows GPUPDATE /FORCE Failed THEN in step 1 (Line 1) 
    7:48:52 pm 25-Jun-19 Windows GPUPDATE /FORCE FAILED in processing THEN step 1, Execute DOS Command, with error Command Message Timed Out, gpupdate /force (Line 1) 

    Perhaps a list of known things that might cause kaseya scripts to timeout would be helpful? This is not a script, antivirus or syntax issue. Maybe UAC? Other?  Thanks, in advance!

  • Gpupdate is sometimes super slow (depending on network and policies) could be that it's simply timing out.

    Have you tried launching the script from the LiveConnect command prompt on the machines that fail?

  • Have you tried to restart both Kaseya Services on the server ?

    Have you tried to remove Kaseya and reinstall ?

    What OS is the server its failing on ?

  • @tmccullough

    I recommend if you like to engage the community for help on a particular script, a screenshot would go way further in helping diagnose.