RMS200262: Understanding RMS custom inventory

Introduction

To utilise custom inventory, the Inventory Agent (ndtrack.exe) must be configured to run VBS files as well as where to find them. 

The easiest way of doing this is via the ‘Managed devices settings’: 

 

Editing these settings provides access to the Inventory Agent’s options: 

 

The Run inventory scripts option configures the Inventory Agent to run VBS files. 

 

The Inventory scripts directory option specifies where the VBS files are located.  The default path shown here uses the $(ScriptDir) variable which translates to the Managed Devices %ProgramData% folder. 

 

 

The easiest way to deploy custom inventory VBS files to Managed Devices is via a basic package. 

 

 

Example VBS

Working Script

Either create or obtain a VBS file that gathers the information required when run manually. 

 

This example utilises a pre-created VBS file that is available via Microsoft’s MSDN website:- 

https://msdn.microsoft.com/en-us/library/windows/desktop/aa366442(v=vs.85).aspx

Delete the highlighted section so that the Windows Firewall isn’t advertently enabled. 

 

When run manually, the following information or similar is displayed: 

 

Required NDTrack Functions

In order for NDTrack to add data gathered via VBS into its NDI file, the following functions are required: 

 

CreateHardware(“<string>”) = Hardware object name. 

SetAttribute “Evidence”, “<string>” = How the data is gathered (registry, wmi, vbs, etc). 

SetAttribute “Class”, “<string>” = Hardware class name. 

AddProperty “<item of interest>”, <value of item> = Hardware property & hardware value. 

 

The LogMessage function can be used so that the progress of the custom scan is recorded within NDTrack’s tracker.log file. 

 

 

NDTrack Script

The following screenshots show how those functions have been incorporated within the working script so that it can be run by NDTrack: 

 

 

Data

Tables

The following tables will be populated by this custom inventory scan: 

 

 

Log

The following tracker.log entries will be recorded when this custom inventory scan is run: 

 

NDI

The following NDI file entry will be created by NDTrack when it gathers data via this custom inventory scan: 

 

SQL Query

The below query can be used to confirm that the data from the NDI file has been process into the database: 

 

Report

The ‘Reporting > inventory > Inventory Overview’ report displays this data as shown below: 

Comments

Powered by Zendesk