Remote install of NSClient++ via Batch/PowerShell
-
neworderfac33
- Posts: 329
- Joined: Fri Jul 24, 2015 11:04 am
Remote install of NSClient++ via Batch/PowerShell
Good morning,
I now have to deploy NSClient++ to around 500 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?
Thanks in advance
Pete
I now have to deploy NSClient++ to around 500 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?
Thanks in advance
Pete
Re: Remote install of NSClient++ via Batch/PowerShell
Hi Pete,
Here is a snippet from our customer support forums. @WillemDH wrote this, and it is pretty neat. I personally have zero experience testing it, but Willem is usually doing some pretty cool stuff.
Here is a snippet from our customer support forums. @WillemDH wrote this, and it is pretty neat. I personally have zero experience testing it, but Willem is usually doing some pretty cool stuff.
WillemDH wrote:Hello,
I'm using this NAF action to install NSCLient and NxLog on 600 Windows Servers:
http://outsideit.net/naf-request-install/
And this one to update the NSCLient++ scripts folder.
http://outsideit.net/naf-update-nsclien ... ts-folder/
If you would use these scripts, the only thing you would still need is a script to put the correct nsclient.ini file in place. (as I can"t publish mine as it contains too many sensitive code)
Grtz
Willem
Former Nagios Employee.
me.
me.
-
neworderfac33
- Posts: 329
- Joined: Fri Jul 24, 2015 11:04 am
Re: Remote install of NSClient++ via Batch/PowerShell
I'll give it a look - thank you!
I got as far as writing a PowerShell script to copy the msi file onto all the servers in question.
It doesn't actually do the installation, but at least it gets the file onto each machine without me having to:
Log onto each machine
Map to a central software repository
Copy the .msi file over
So it's a start!
Pete
I got as far as writing a PowerShell script to copy the msi file onto all the servers in question.
It doesn't actually do the installation, but at least it gets the file onto each machine without me having to:
Log onto each machine
Map to a central software repository
Copy the .msi file over
So it's a start!
Pete
Re: Remote install of NSClient++ via Batch/PowerShell
Peter,
Give my scripts a try. They should make you happy.
Grtz
Willem
Give my scripts a try. They should make you happy.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Remote install of NSClient++ via Batch/PowerShell
Thanks for all of your hard work, Willem.
Pete, let us know if there's anything we can do to assist.
Pete, let us know if there's anything we can do to assist.
Former Nagios Employee.
me.
me.
-
neworderfac33
- Posts: 329
- Joined: Fri Jul 24, 2015 11:04 am
Re: Remote install of NSClient++ via Batch/PowerShell
Good morning!
Here's where I am so far, and both versions appear to work on their respective platforms:
Win32:
Win64:
Note that since the Win64 version of the installer suggests a default password during the installation (whereas the Win32 version doesn't), you need to set the value to to "".
Just thought these might help someone!
Pete
Here's where I am so far, and both versions appear to work on their respective platforms:
Win32:
Code: Select all
msiexec /l* log.txt /i NSCP-0.4.0.169-win32.msi CONF_CAN_CHANGE="TRUE" ALLOWED_HOSTS="99.99.99.99" CONF_CHECKS="TRUE" CONF_NSCLIENT="TRUE" /quiet
Code: Select all
msiexec /l* log.txt /i NSCP-0.4.3.143-x64.msi CONF_CAN_CHANGE="TRUE" ALLOWED_HOSTS="99.99.99.99" NSCLIENT_PWD="" CONF_CHECKS="TRUE" CONF_NSCLIENT="TRUE" /quiet
Just thought these might help someone!
Pete
Re: Remote install of NSClient++ via Batch/PowerShell
Thanks for the feedback.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
neworderfac33
- Posts: 329
- Joined: Fri Jul 24, 2015 11:04 am
Re: Remote install of NSClient++ via Batch/PowerShell
Actually, I'm now having some difficulty with the Win32 version of this - all servers where I used the MSIEXEC silent install come up with "Connection Refused".
If, however, I log onto the remote server, manually uninstall and reinstall (using the .msi file within Explorer, as somebody kindly disabled "Add/Remove Programs"!), everything works fine.
Post installation, my script also overwrites the nsclient.ini file with an ini file containing the correct settings, taken from a server on which a manual installation was carried out.
Any pointers as to a command line to uninstall, prior to installing, within my PowerShell script would be most appreciated, otherwise, I'm going to have to manually log onto 200+ Win32 servers, uninstall and reinstall... dear God, no...
Thanks in advance
Pete
If, however, I log onto the remote server, manually uninstall and reinstall (using the .msi file within Explorer, as somebody kindly disabled "Add/Remove Programs"!), everything works fine.
Post installation, my script also overwrites the nsclient.ini file with an ini file containing the correct settings, taken from a server on which a manual installation was carried out.
Any pointers as to a command line to uninstall, prior to installing, within my PowerShell script would be most appreciated, otherwise, I'm going to have to manually log onto 200+ Win32 servers, uninstall and reinstall... dear God, no...
Thanks in advance
Pete
Re: Remote install of NSClient++ via Batch/PowerShell
Starting to drift a bit outside of our support scope, but some quick Googling:
http://stackoverflow.com/questions/1135 ... powershell
I am not a big PS guy so I can't give any first-hand advice.
http://stackoverflow.com/questions/1135 ... powershell
I am not a big PS guy so I can't give any first-hand advice.
Former Nagios employee
-
neworderfac33
- Posts: 329
- Joined: Fri Jul 24, 2015 11:04 am
Re: Remote install of NSClient++ via Batch/PowerShell
Good afternoon,
I finally worked out that it's a problem with the 32 bit client that means that MSIEXEC silent install doesn't work properly - it DOES install, but the resulting client doesn't work, even if you copy a valid settings file from a working server over the top of the one that's just been installed.
The Install of the 64 bit client on Win2008 and Win2012 servers works fine.
And yes, I DID end up having to manually log into 107 Win 2003 servers, uninstall and reistall..!
Deep joy.
This thread can now be closed.
Thanks
Pete
I finally worked out that it's a problem with the 32 bit client that means that MSIEXEC silent install doesn't work properly - it DOES install, but the resulting client doesn't work, even if you copy a valid settings file from a working server over the top of the one that's just been installed.
The Install of the 64 bit client on Win2008 and Win2012 servers works fine.
And yes, I DID end up having to manually log into 107 Win 2003 servers, uninstall and reistall..!
Deep joy.
This thread can now be closed.
Thanks
Pete