Menu

PowerShell – Install Nagios client on a remote Windows Server

As Windows Administrators, we need to install many tools on the Windows Server as part of the onboarding process. One such critical tool is Nagios, used for monitoring servers.

The onboarding process takes a heavy toll on the on-boarding enginers when we are on-boarding new client. This is because we have to install tools on 50-100s of servers. Manual installation of each installation will take ~20 minutes depending on the configuration.

The best solution to remove manual effort, human error and to increase ROI is to automate the process.

I have written a PowerShell script that does just that. You can download the script from my Microsoft Script Center repository:

The script will install Nagios client to a remote server. It copies the MSI and the INI file to the remote computer’s C drive and then executes it. Once the execution is completed, it will copy the “nsclient.ini” file to the installed folder.

Pre-Requisites:

– The servers are to be domain joined.

– Powershell remoting to be enabled on both servers.

Next Steps:

You can enhance the script, that accepts server list and executes against all the servers.

Tested on: Windows Server 2012 R2

Note: You may have to edit the script if you are changing the name of the MSI file. The script uses: NSCP-0.4.4.19-x64.msi