Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

How to generate a .ocs file manually

Hy !

If it is possible, How can I generate a .ocs file manually ? I see that .ocs file It is similar to a xml file. 

I try create one but not work !

Below is the xml I created manually:

<?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <CONTENT>

    <HARDWARE>

      <DESCRIPTION>Server datacenter VM</DESCRIPTION>

      <LASTLOGGEDUSER>user</LASTLOGGEDUSER>

      <NAME>SERVER_HOST_NAME</NAME>

      <USERID>user</USERID>

      <VMSYSTEM>server</VMSYSTEM>

      <WORKGROUP>datacenter VM</WORKGROUP>

    </HARDWARE>

<USERS>

      <LOGIN>user</LOGIN>

    </USERS>

  </CONTENT>

  <DEVICEID>server</DEVICEID>

  <QUERY>INVENTORY</QUERY>

</REQUEST>

When I try inject to ocs server happens this error : 

ERROR: 400 Bad Request
OBS: When I use ocsinventory-agent to create .ocs and injet to server it works with success. 
in OCS Inventory NG agent for Unix by (120 points)

2 Answers

0 votes
Hi,

Which version of ocs server and agent do you use?

To create a .ocs file use this command => ocsinventory-agent --debug --local <your_directory_where_you_want_to_store_the_file>

Regards

Frank
by (90.2k points)
0 votes

Hi,

on Windows client machine, you can generate in the current folder :

a OCS file :

"C:\Program Files (x86)\OCS Inventory Agent\OCSInventory.exe" /local=".\"


a XML file :

"C:\Program Files (x86)\OCS Inventory Agent\OCSInventory.exe" /local /xml=".\"

Regards, Stéphane

by (32.6k points)
 
Powered by Question2Answer
...