Personal tools
You are here: Home Inventory and SLM Extending Inventory with Unmodeled Data (Free AD Groups)

Extending Inventory with Unmodeled Data (Free AD Groups)

by Denny Cannon last modified 2008-03-25 09:45

This will teach you how to extend LANDesk's inventory scanner, by allowing you to execute other scripts and exes, and then sending that additional information up to the LANDesk inventory database as one communication.

Extending the inventory and collecting the additional data can be pushed out with the client by adding this to the NTstacfg.in# file, extending your ldappl3.template file in the ldlogon directory, and then run stamper and re-save your agent configuration files in the LANDesk console.

- Step 1  Make a copy of the ntstacfg.in# and save it somewhere as a backup.

- Step 2  In the 'LDLogon' directory on the core server edit the ldappl3.template file via Notepad.  Insert the registry key you want to get and where you want to view that information in the LANDesk console like this:


 (In the above example, a registry key of LastBootup is read and then viewed in the LANDesk console under Custom Data - OS - Last Start Up Time.)

- Step 3  Copy the script or program or whatever it is you want to execute when the LANDesk inventory scanner runs, to the 'LDLogon' directory on the core server.  In this example we are using an exe called extendinv.exe.

- Step 4  Edit the ntstacfg.in# in the 'LDLogon' directory to copy extendinv.exe to the ldclient directory when the agent installs.  The edit to the ntstacfg.in# should be done in the 'Data Collections Forms' area like this:


- Step 5  Edit the ntstacfg.in# in the 'LDLogon' directory. The changes we are going to make will make changes to the ldscnhlp.ini during the client installation. Adding line INI304= in the ntstacfg.in# will setup a process that everytime ldiscn32.exe runs on the client the extendinv.exe will run too.  (Note: You must use the word LAUNCH as the "Key Word" for the entry and use the TIMEOUT= at the end of the line for time to execute the LAUNCH process.  If you don't use BOTH of them the task will not run.  Also the TIMEOUT is figured in seconds.  It is a fail safe for the process where as if the LAUNCH process doesn't complete in the specified seconds the TIMEOUT will kill the process and then move on.  If the LAUNCH process ends before the TIMEOUT, the ldiscn32.exe continues on and does not wait for the TIMEOUT period.)  The INI303= line will tell ldiscn32.exe to pickup the txt file created by extendinv.exe and send it to the inventory of that machine under Custom Data.  Again put the ini edits in the 'Data Collections Forms' area of the in# like this:


Note:  If you are running LANDesk 8.5 or higher, you will need to run stamper.exe from the ldmain directory, and rebuild any client configurations after you change the NTstacfg.in# in order to get this change into your different configurations.

 Due to the nature of how the LDSCNHLP.INI file works, anything with Data##= will be added under the Custom Data group in the LANDesk console.  If you would like to create a new group and add that information to the root of the computer, use DataNoPrepend##= and the information will show up at the root of the inventory tree under the computer name.

Now that you have made these changes and have pushed the client out, you will be able to see in the inventory of a machine the local groups and their members as well as all local scheduled tasks and their frequency.  Here is a sample of that view:

 The Extended inventory exe used in this example will now only collect local groups and all the local and domain users that are part of that group only.  It requires .NET to be installed on each workstation that runs it.  To use the Extended inventory exe used in this example click here.  For the source code click here.  For a vbscript version of the group membership enumeration click here.


Related content
Server Says:
If you wait long enough, it will go away... after having done its damage.
If it was bad, it will be back.
Safety First!
62 Days without a Dumpster fire.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: