Automated Icinag2 Agent installation on Windows Servers

Hi team,

I have been struggling to find the better path for automated Icinga2 agent & NSclient++ installation on windows servers.

Can you someone advise any documentation or any powershell scripts that i can find for automated icinga2 agent installlation.



this highly depends on your environment. If you have a configuration management at hand I recommend to use this to deploy the Windows Agent across your servers. In the documentation you find notes about how to silently install the Windows Agent with msiexec:

If you also want to automate the configuration you can trigger the node setup. An example can be found here: On Windows you must calling the icinga2.exe with your paramters for example:

C:\Program Files\ICINGA2\bin\icinga2.exe node setup ...

You can also have a look into the Windows Powershell module: Unfortunately I don’t have any experience with this module, so I can’t say anything about it.

Kind regards

Unfortunately… we don’t configuration management tool (CHEF/PUPPET/Ansible). Just thinking to use the poweshell-module…

I am just trying to figure out possibilities without configuration managment technology

I made a simple BAT file to use PSEXEC to run the automated install of NSC++.

echo Running on %1…
psexec -his -accepteula -nobanner \%1 msiexec /qn /l* C:\NSCP_install_log.txt /i “\\share\SoftwareDist\NSClient++\NSCP-” INSTALLLOCATION=“C:\Program Files\NSClient++” CONF_CAN_CHANGE=1 ALLOWED_HOSTS=“,,,,” NSCLIENT_PWD=[your_password_here] CONF_CHECKS=1 CONF_NSCLIENT=1
copy “\\share\SoftwareDist\NSClient++\nsclient.ini” “\%1\C$\Program Files\NSClient++\nsclient.ini”
psexec -his -nobanner \%1 net stop nscp
psexec -his -nobanner \%1 net start nscp
echo Done.

Powershell is very different/inconsistent between Server versions. We used PSEXEC to deploy Chocolately which makes it very easy to get all servers on PS 5.1. Then use Chocolately to deploy OpenSSH Server on all of your Windows Servers to be like Server 2019. Now you have all of the power and flexibility of SSH key authentication like a Linux box.