Kaseya Community

How to install Kaseya Agent via batch file?

This question is not answered

I am transferring a bunch of endpoints that are managed by a competitor RMM, so I have privileged console access to the target machines. I am trying to run the following batch file, but it seems to get hung up on downloading the kcssetup.exe file. I've had it work here and there, but there doesn't seem to be any consistency. Does anyone have a better way to install Kaseya via batch file? The machines I need to migrate are not domain controlled, so deployment via logon script or policy is not an option, nor do I have unified credentials so install via lan watch won't work either. Here is my script (certain elements obscured)

powershell -Command "(New-Object Net.WebClient).DownloadFile('https://xxxxx.kaseya.net/deploy/#/xxxxxxx/xxxxgroup.root', 'c:\Windows\temp\KcsSetup.exe')"
TIMEOUT 120 /NOBREAK
c:\Windows\temp\KcsSetup.exe /s

All Replies
  • A couple of thoughts:

    Is the competitor also using Kaseya? The installer may be bailing because it sees an agent already in place, which means you'll need the /r command switch as well.

    Hanging up on downloading, though, suggests that the URL to the auto-generated installer doesn't play well with whatever CURL-like call Powershell is making. You might need to stage the file on a webserver and download from that instead.

  • The other RMM is Atera. The download was definitely failing because Powershell lacks a compatible SSL method, but when I staged the file to cloud storage, I was sometimes able to get it to work, and sometimes not. I'm not sure why. I suspect my biggest hang-up right now is being able to pull the installer to the target machine when I am limited to using the command line via remote, privileged console session.

  • , you are using a URL from the System tab, that URL brings up an HTML page that the user can click on.     Try creating a package from the Agent Tab, Packages, Manage Packages, and use that URL.  That will download directly.

    The URL should look something like this:

    yourserverurl.com/mkDefault.asp