How to Inventory Windows Machines from a Network Share
Running inventory from a network share involves preparing the network share, running the inventory, and processing each inventory.
The information in this topic applies to Windows machines only.
Part 1: Prepare the Network Share Location
You only need to do this part once.
To prepare the network share location:
- Create a network share with read access and, if you plan to use the same location to write the generated output files, write access by other machines.
- From a machine that has the
installed on it (for example, the administrator’s machine), navigate to
C:\Windows\SysWOW64\wex4962(64-bit versions of Windows) or
C:\Windows\System32\wex4962(32-bit versions of Windows).
- Copy the contents of the
wex4962folder to the share.
Machine menu, select
Remote Inventory, then select
This will generate an inventory configuration file (
config.xml) in the location shown in the Prepare Remote Inventory Agent dialog box.This dialog box lists locations for the both Windows-based machines and Mac OS systems.
Navigate to the appropriate location and copy the
config.xmlfile to the share. (You do not need to copy all of the files there, just
config.xml. If a
config.xmlfile was copied over in step 3, overwrite it with this one.)
- From the machine on which
is installed, navigate to one of the following folders and copy
EMInvFS.wsfto the share:
- On 32-bit machines:
C:\Program Files\Cherwell Asset Management\CAM Administrator\InventoryFromShare
- On 64-bit machines:
C:\Program Files (x86)\Cherwell Asset Management\CAM Administrator\InventoryFromShare
- On 32-bit machines:
ProcessEMInvFS.wsfto the same
wex4962folder you used in step 3 above.
for example, the rest of this topic assumes a share of
\\myserver\esminv was created and populated with the
files specified in steps 3 and 4 above.
Part 2: Run Inventory
From a share
From a command line prompt on your share, or in your login script:
wscript "\\<inventory files server name>\<inventory
files share name>\EminvFS.wsf" /output:"\\<output server
name>\<output share name>" /quiet
In the example above, the inventory config file is read, and the
inventory agent is launched from
\\<inventory files server name>\<inventory files share
name>. The resulting inventories are saved to
"\\<output server name>\<output share
From your local machine
Open a command prompt and use cscript to execute the
- Example with parameters:
cscript <share location>EMInvFS.wsf [/output:<writable shared location>][/quiet][/debug]
- Example without parameters:
- If your source share is read-only and your destination share is
cscript "\\myserver\myshare\EMInvFS.wsf" /output: "\\myserver2\myshare2\myfolder\"
Use to specify the output folder into which a subfolder containing the inventory files will be created. If this parameter is not specified, the share folder itself is assumed to be the output folder.
Use to run the inventory agent without displaying its user interface; if this parameter is not specified, the user interface is displayed.
Use to display
EmInvFS.wsfscript progress messages.
The inventory agent will write its inventory (a set of .xml files)
into a subfolder in the output folder (either the share or the folder specified
by the /output parameter as described above). The name of the subfolder is of
esm_<machine-name>yyyymmdd. For example, if the
script is run on August 10, 2012 on a machine named JERRY160L and no output
folder is specified, the inventory files would be created in
Once inventory completes, you can process it for inclusion in the CAM database.
Part 3: Process Each Inventory
You can process the inventory .xml files in one of two ways:
Machine menu, select
Remote Inventory > Import. Enter (or browse
to) the subfolder containing the inventory files (for example,
\\myserver\esminv\esm_JERRY160L20120810), and select Import.
- or -
- On the machine where the
is installed, open a command prompt and use cscript to execute the
ProcessEmInvFS.wsfscript.If you want to be able to run
ProcessEMInvFS.wsffrom a different machine, copy the
ProcessEmInvFS.wsffile to the appropriate location on that machine as well.
ProcessEMInvFS.wsftakes the following arguments:
This is the folder into which one or more subfolders containing the inventory files are located. If you did not specify an output folder in part 2 above, this is the share folder itself. In the above example, you would specify:
All subfolders with names conforming to the convention used to inventory from a share will be processed.
(Optional) Use this to specify that the user interface of the agent used to process the inventory files will be visible. If you do not specify this, the agent runs without displaying its user interface. Note: If you are processing more than one inventory, you will need to select the agent's Close button after each inventory is processed.
(Optional) Use if you do not want the ProcessEMInvFS.wsf script to display a summary once all inventories have been processed. If you do not use /summary, a message box is displayed.
(Optional) Use this to specify that each subfolder of inventory data is to be deleted once it has processed. If you do not specify /delete, each folder is renamed once it has been processed by pre-pending "
processed_" to the subfolder name. For example, after the inventory contained in
esm_JERRY160L20120810is processed, that folder will be renamed to
processed_esm_JERRY160L20120810, so that if the script is rerun at a later date, the folder will not be re-processed.