You are not logged in.
Pages: 1
In our school we only once do an inventory of new computers.
We have to add 5 additional data: entity, inventory number, type of computer, user and location.
Until now we used ocsng were I can add extra fields for these data and make a rule for putting the pc in the correct entity.
Now we want to switch to the glpi agent in our windows environment.
I do glpi-inventory.bat > pc.xml and then glpi-injector.bat --file pc.xml --url https://glpi/front/inventory.php.
This works just fine.
After testing I come to the conclusion I can add two of the five, inventory number and type of computer, with the --additional-content parameter.
The other three, entity, user and location , I don't see a solution.
Am I correct or is there a solution I didn't find?
I think I will make a small program that will pass these data to a php script that then will check if the pc is added to glpi and then add the data to the pc.
Offline
Hi Feike,
you should probably use the tag and setup rules base on tag to select entity and location.
For the user, additonal-content should work too to even override the one automatically found. It should be set as "LASTLOGGEDUSER" in HARDWARE section.
GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer
Offline
After more testing I end up making a small program in C#that will pass these data to a php script that then will check if the pc is added to glpi and then add the data to the pc.
The data is placed in a file which my small program will upload to the php script I made.
So I created a batch file with three commands:
@echo off
glpi-inventory.bat > pc.xml
glpi-injector.bat --file pc.xml --url https://glpi/front/inventory.php
glpiInventarisatie.exe
Now the inventory works just fine.
Offline
Pages: 1