Deploy NSClient++


#1

Good morning,

I now have to deploy NSClient++ to around 50 servers.

We don’t have SCCM here - has anyone on the forum ever come up with a working Batch/PowerShell script to carry out a remote install? also with a specific configuration (.ini).

Thanks in advance


#2

I would look into microsoft’s desired state configuration (MS DSC) concepts. Here is a good starting point: https://docs.microsoft.com/en-us/powershell/dsc/overview https://docs.microsoft.com/en-us/powershell/dsc/quickstart https://docs.microsoft.com/en-us/powershell/dsc/gettingstarted

Here is a non-MS perspective of how to use DSC and some examples:

Good luck and cheers! —Roman


#3

I install with msiexec-

Invoke-Command -ComputerName $hostname -ScriptBlock { msiexec /q /i NSCP-0.5.0.62-64.msi INSTALLLOCATION=“C:\Program Files\NSClient++” CONF_NRPE=1 CONF_CHECKS=1 NRPEMODE=LEGACY MONITORING_TOOL=none CONF_CAN_CHANGE=1 CONFIGURATION_TYPE=registry ALLOWED_HOSTS=“IPOFYOURNAGIOSBOX” }

Although i store the settings in the registry, if you want to use a file you can stick in a file copy and change the CONFIGURATION_TYPE= parameter