Powershell script to install and register agent

Hello,

Before I reinvent the wheel does maybe one have already a PowerShell script available to install and register agent version 1.6?

Thanks for your help in advance

Michael

the install can be done by any software deployment tool like Intune, SCCM, PDQ, etc. so I don’t really have a script for that but a one liner for an install would be something like this:

msiexec /i <file name here>.msi /qn

As for the registration, you can do something like this which is what I’m doing:

$hostname = $(($env:Computername).ToUpper())
$updateserver = "checkmk-server-name"
$site = "site-name"
$user = "checkmk-user"
$secret = "secret"

& "C:\ProgramData\checkmk\agent\plugins\cmk-update-agent.exe" register -s $updateserver -i $site -H $hostname -p https -U $user -S $secret -v
& "C:\ProgramData\checkmk\agent\plugins\cmk-update-agent.exe" -v
1 Like

We use IVANTI for mass deployment. How to install and register agent is clear to us. The problem is that the packages for IVANTI are developed from a Team in Mexico. These guys having issues with the registration process and are not able to provide any debug output whatsoever. So we decided to write the installation script by our own. The challenge is not to do the bare installation, its more to capture the exceptions and then do the right thing to fix the issue. Even so we do some configuration of the agent based on some local conditions, but that’s another story behind the agent installation.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.