Configuring the Stand-Alone VMware Inventory 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> |
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://servername/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==
Note: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.