Page 1 of 1
Remote install of NSClient++ via Batch/PowerShell
Posted: Tue Sep 22, 2015 5:33 am
by neworderfac33
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
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Tue Sep 22, 2015 9:28 am
by hsmith
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.
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Tue Sep 22, 2015 10:08 am
by neworderfac33
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
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Tue Sep 22, 2015 11:04 am
by WillemDH
Peter,
Give my scripts a try. They should make you happy.
Grtz
Willem
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Tue Sep 22, 2015 4:42 pm
by hsmith
Thanks for all of your hard work, Willem.
Pete, let us know if there's anything we can do to assist.
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Wed Sep 23, 2015 3:45 am
by neworderfac33
Good morning!
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
Win64:
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
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
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Wed Sep 23, 2015 11:22 am
by tgriep
Thanks for the feedback.
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Mon Sep 28, 2015 8:20 am
by neworderfac33
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
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Mon Sep 28, 2015 9:32 am
by tmcdonald
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.
Re: Remote install of NSClient++ via Batch/PowerShell
Posted: Wed Sep 30, 2015 11:31 am
by neworderfac33
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