VMware Stand-alone Inventory Agent for FlexNet Manager Suite

VMware Stand-alone Inventory Agent for FlexNet Manager Suite


For secure environments (for example, VMware servers secured by firewalls), Flexera offers a stand-alone VMware inventory collection agent that can be installed on a Windows server.

This article explains what you need to know and do to use it.


Discovery and inventory information is a prerequisite to performing license consumption calculations in FlexNet Manager Suite. We recommend that you deploy one or more inventory beacons on your network, and use any of the supported inventory collection methods to collect VMware inventory. Each inventory beacon collects discovery and inventory information from the devices within its assigned subnet and sends this information to FlexNet Manager Suite. To collect inventory, each inventory beacon requires a network connection to the target VMware vCenter or ESX servers within its assigned subnet.

In secure environments (for example, VMware servers secured by firewalls), you may not be able to establish a network connection between each installed inventory beacon and the VMware servers within its assigned subnet, or you may not be able to install any inventory beacon at all. For such environments, Flexera offers a stand-alone VMware inventory collection agent that can be installed on a Windows server. Although capable of collecting inventory from individual VMware ESX servers, this agent works more efficiently with VMware vCenter servers, where it collects inventory for all VMware ESX servers registered with the target VMware vCenter server. In a clustered environment, the agent can collect VMware inventory for the entire VMware cluster through the target VMware vCenter server. The stand-alone agent saves the collected VMware inventory information (as .ndi files) to a specified location. You will have to export the collected data to FlexNet Manager Suite for performing license consumption calculations.


The stand-alone VMware inventory agent has been designed to remotely collect VMware (ESX or vCenter) inventory when you cannot use any of the inventory collection methods recommended by Flexera. You can deploy this agent on any computer with Windows desktop (Windows 7 or higher) or Server (2008 or 2012) edition. To collect VMware inventory, the agent needs credentials for an account with read access to VMware SDK URL on each of the target VMware servers. When you run the agent after configuring it with the details of the target VMware servers, the agent collects VMware inventory using API calls. The collected information is saved to a configured location from where it can be uploaded to FlexNet Manager Suite for license consumption calculations. The following diagram illustrates the process of VMware inventory collection through the stand-alone VMware Inventory agent:


To collect VMware inventory through the stand-alone VMware inventory agent, complete the following steps:

  1. Verify the prerequisites. See the Prerequisites section below.
  2. Deploy the inventory agent. See the Deploying the Agent section below.
  3. Configure the inventory agent. See the Configuring the Agent section below.
  4. Collect VMware inventory. See the Collecting Inventory section below.
  5. Export the collected inventory to FlexNet Manager Suite. See the Exporting Inventory section below.
  6. (Optional) Uninstall the inventory agent. See the Uninstalling the Agent section below.


The following are the prerequisites for inventory collection using the stand-alone VMware inventory agent:

  • A VMware vSphere/vCenter/ESXi server, supporting versions from 5.0 to 6.7 inclusive.
    Note: Inventory is not possible on the free license versions of ESXi.
  • The following software products are required on the server where the agent is to be deployed:
    • Windows desktop (Windows 7 or higher) or Server (2008 or 2012) edition
    • Microsoft .NET Framework version 4.0 or later.
  • Network access to the target VMware vCenter or ESX hosts.
  • An account with read access to the VMware SDK URL is required on each target vCenter or ESX host.

Deploying the Agent

The stand-alone VMware inventory agent is shipped as a zip archive. Follow these steps to deploy the agent:

  1. Create a folder (for example, VMwareInventory) on the Windows desktop or any other location.
  2. Extract the contents of the Flexera-supplied stand-alone inventory agent file FNMS-VMware-Scanner.zip into this folder.
  3. Using Windows Explorer, create a folder to save the collected inventory information (for example, C:\Inventories\). You should add this path to the OutputDir parameter in the esxquery.ini file.

Configuring the Agent

To enable the stand-alone VMware inventory agent to collect inventory from target VMware servers, register every target VMware server with the agent, and record the VMware server name in the esxquery.ini file. Follow these steps to configure the agent:

  1. On the computer where you deployed the agent, launch the Windows command prompt with the "Run as administrator" option enabled and browse to the VMwareInventory folder.
  2. Invoke the agent by using the following command. The agent should display a list of available options:
    ..\VMwareInventory> esxquery
    server Query specified server
    -a Query all configured servers
    -l List configured servers and credentials
    -s Set logon credentials for server
    -d Delete logon credentials for server
    -c Use existing logon session cookie
    -f Set VMware license flag for server
  3. When the agent is not being run for the first time, use the following command to list any previously-targeted VMware servers that are still registered with the agent:
    esxquery.exe -l
  4. If any undesired VMware servers are registered with the agent, use the following command with the name of the VMware server whose registration is to be deleted:
    esxquery.exe -d <server name>
    where <server name> is the VMware server name.
  5. Use the following command to register a target VMware server with the stand-alone VMware inventory agent. The agent will collect inventory only from the VMware servers registered with it:
    esxquery.exe -s <server name>
    where <server name> is the name of the target VMware server that is to be registered with the agent. The agent prompts you to enter the credentials for this server.
  6. Enter the credentials for the account with read access to the VMware SDK URL <https://<server name>/sdk>> created on this VMware server.
  7. Repeat step 5 for each of the target VMware servers. The agent records each server name with its username and encrypted password in the esxquery.ini file in the VMwareInventory folder.
  8. Set the OutputDir parameter to the path where you want the agent to store the collected inventory files. The following code example sets the output directory to the .\Inventories sub-folder under the VMwareInventory folder. The following code also describes how two VMware servers, server1 and server2 have been recorded in the esxquery.ini file.
    [Global] OutputDir=.\Inventories
    [server1] Username=<domain\user name> Password=CtCi3795PXgxC3W8W7gdSg==
    [server2] Username=<domain\user name> Password=EEfoiY3pmz0xC3W8W7gdSg==
    The esxquery.exe tool encrypts the password automatically, before saving it to the esxquery.ini file.
  9. Use the following command to review the list of VMware servers registered with the stand-alone agent:
    esxquery.exe -l

Your agent is now ready to collect inventory from the target VMware servers.

Collecting Inventory

When you have registered all target VMware servers with the stand-alone VMware inventory agent, you can run the agent to collect VMware inventory from the registered VMware servers. Follow these steps:

  1. Use the following command to run the stand-alone VMware inventory agent. The agent executes, collects inventory from each of the servers listed in the esxquery.ini file, and saves the inventory files (.ndi) in the output folder specified in the esxquery.ini file.
    esxquery.exe -a
    The agent runs and displays inventory success messages. The following code shows an example output:
    C:\Flexera\VCenter Query>esxquery.exe -a
    servername: found VMware vCenter Server v4.1.0
    servername: inventory generated successfully
  2. Using Windows Explorer, navigate to the output folder (C:\VMwareInventory\Inventories). You should see an .ndi file for each of the target ESX servers. Each .ndi file contains inventory for a target ESX server, as well as all of the virtual machines registered with it.
    Note: The stand-alone VMware inventory agent also collects inventory for the virtual machines that were switched off during the inventory collection process.

Exporting Inventory

The license consumption calculation process of FlexNet Manager Suite requires the collected .ndi files for calculating your VMware license position.

If you have installed FlexNet Beacon, you can manually transfer the collected inventory (.ndi) files to the Incoming\Inventories folder. The FlexNet Beacon uploads the inventory to FlexNet Manager Suite.

If you have not installed any inventory beacons, you can use any third-party methods to export the imported inventory to the "C:\ProgramData\Flexera Software\Incoming\Inventories" folder on the FlexNet Manager Suite server.

Uninstalling the Agent

You can easily uninstall the stand-alone VMware inventory tool by deleting the:

  • Deployment folder (VMwareInventory)
  • Output folder (Inventories).

Appendix: API Calls for VMware Inventory Collection

The stand-alone VMware inventory agent connects to the VMware SDK URL (https://<servername>/sdk) on each target VMware server. This connection requires an account with read access to the SDK URL. Once a connection is established with the target VMware server, the agent makes the following API calls through the SDK:

API name Description
GetServiceContent A single call is made to this API to retrieve the ServiceInstance to enable further queries.
RetrieveProperties: Host Information A single call is made against the root folder to return information about each host server with the following attributes:
  • ComputeResource.host
  • ClusterComputeResource.host
  • Datacenter.hostFolder
  • Datacenter.vmFolder
  • Folder.childEntity
RetrieveProperties: VM Information A call is made against each returned HostSystem to obtain the following attributes for each virtual machine that exists on the host:
  • HostSystem.parent
  • ComputeResource.resourcePool
  • ResourcePool.resourcePool
  • ResourcePool.vm
Was this article helpful? Yes No
100% helpful (4/4)

Where can I download the mentioned zip archive of stand-alone VMware inventory agent ?




It is part of the Additional Inventory Tools for FlexNet Manager Suite bundle.

Hi @jonathanl,

thanks for reply, I just checked Flexera Product and License center > FlexNet Manager Suite 2018 R2 and also 2019 R1 and I can't find there "Additional Inventory Tools" bundle. Can you please more specific?



Any chance this can be made into a standalone "application" which you can input the variables, schedule as a service, and upload to a beacon? Seems like an overly complex setup for a simple task that happens for many customer environments.

Hi Pavol.

I cannot find the package on the site any longer. I have a copy of it if you give me your email address. Otherwise I guess you could ask Support.

Attachment added. Our apologies that it was missing.

Thanks @dswann for attachment 🙂


Hi All,


I get errors running the lite collection against some of our VMware Virtual centers. The Virtual Centers with issues appear to be using SSO.

I can manually log into the VC with the specified account but esxquery.exe shows the below error:


BindServer(<server ip>, proto=https, port=0) failed.


Anyone else have these issues?


Anyone know if their are any possibility for verbose logging for the esxquery.exe?
I'm trying to figure out the reasons why I get Login Failed since it's working interactively.

Are the tool supported on never version of Microsoft Windows, I'm trying to run it on Windows Server 2019? Have anyone succeeded to run it in an ordinary shell not administrative shell?


Same issue as @rwiltshire  - BindServer(<server ip>, proto=https, port=0) failed.


We are getting the following message and error when we try run esxquery -a 

buf-vCenter: found VMWare vCenter Server v6.7.0

GenerateInventory(C:\_trunk\vCenter\Inventory) failed for server buf-vcenter
Any ideas?


If you have a beacon installed you can enable normal tracing for esxquery which will hopefully give extra information. (C:\Program Files (x86)\Flexera Software\Inventory Beacon\etdp.trace). You should enable the Inventory/VMware section followed the the normal esxquery -a.

@craig_mooreDid you execute the CMD as admin and can you try a different path without the underscore as it looks like everything is working but you cannot write your inventory.

I often came across issue with the local proxy settings which result in errors in the esxquery. you may check the proxy settings by running "netsh winhttp show proxy"




Version history
Revision #:
9 of 9
Last update:
‎Feb 20, 2021 07:33 PM
Updated by: