7. OCS Inventory NG Agent Installation
First we need to to have something to install, right? We will build our own OCS Inventory NG Agent setup package which can be deployed on computers in different ways.
I will, however, not cover HOW to deploy it since there are multiple ways like psexec, gpo, third party tools, logon scripts etc.
7.1 Configure and Build OCS NG Agent by OcsPackage.exe
Ok once we have fully working OCS Server it would nice to start inventorying computer wouldn’t it be?
Since we disabled http access to /download we need to provide server certificate to clients/agents. We need to download it directly from the server. Do not save it from web browser – it will not work.
Open up WinSCP and initiate new session with user credential – do not try to login with root – it will not work unless you explicitly allow root to SSH to server. I didn’t so I assume You, my friend didn’t as well. Use normal account. I use milosz:
Now, navigate to /etc/ssl/certs and copy created cert called ocsng.pem renaming it to cacert.pem:
Now, let’s sum up what we need to install agent on remote computers:
- Ip address / fqdn of ocs server matching cname in SSL certificate
- Valid cacert.pem downloaded from OCS server
- OCS NG Packager
- OCS Windows Client setup file
- Idea how we want OCS Agent to run on client computers
Once we have all above (I know- point five not clear but few examples are above)
Fire up OCS Packager (answer no if you will be deploying it by other OCS or GPO that uses Admin/System account-yes otherwise, but you will need to use PSEXEC):
Command line parameters are as follows:
/S /NOW /SERVER=https://192.168.160.132/ocsinventory /SSL=1 /NOSPLASH
/S – Silent
/NOW – run and send inventory NOW
/SERVER – pretty easy
/SSL – enable SSL communication – will not work without CaCert.pem from server!
/NOSPLASH – no splash on startup ;)
Note that I prefer to have systray enabled in order for users to receive notifications when running packages on their computers. If you do not need it just add /NOSYSTRAY
Full list of switches can be found here: http://wiki.ocsinventory-ng.org/index.php?title=Documentation:WindowsAgent#OCS_Inventory_NG_Agent_for_Windows_command_line_options
If you like to, you can add plugins to packager as well! Like office key reader or something. We do not need them at the moment. Press Next, specify output directory (file will be called OcsPackage.exe) and press OK and after few seconds:
OcsPackage.exe is ready for deployment!
Just double click OcsPackage.exe wherever you saved it, wait couple of seconds (well, maybe a minute). Then you should see your computer in OCS server:
That was easy, wasn’t it?