• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with local inventory via command line
#1
Hello All!

I am trying to get inventory of local PC on commadndline (windows pc).
No matter what I do, it fails.

I can get a file to save as XML, but it does not save correctly.

Here is the folder:
C:\Users\SteveK\Downloads\FusionInventory-Agent>dir
Volume in drive C is OS
Volume Serial Number is 1A8B-57E1

Directory of C:\Users\SteveK\Downloads\FusionInventory-Agent

12/16/2019  10:03 AM    <DIR>          .
12/16/2019  10:03 AM    <DIR>          ..
12/16/2019  10:03 AM    <DIR>          certs
12/16/2019  10:03 AM    <DIR>          data
12/16/2019  10:03 AM    <DIR>          docs
12/16/2019  10:03 AM    <DIR>          etc
12/16/2019  10:03 AM              146 fusioninventory-agent.bat
12/16/2019  10:03 AM              110 fusioninventory-esx.bat
12/16/2019  10:03 AM              115 fusioninventory-injector.bat
12/16/2019  10:03 AM              116 fusioninventory-inventory.bat
12/16/2019  10:03 AM              119 fusioninventory-netdiscovery.bat
12/16/2019  10:03 AM              119 fusioninventory-netinventory.bat
12/16/2019  10:03 AM              116 fusioninventory-wakeonlan.bat
12/16/2019  10:03 AM              110 fusioninventory-wmi.bat
12/16/2019  10:03 AM    <DIR>          logs
12/16/2019  10:03 AM    <DIR>          perl
12/16/2019  10:03 AM    <DIR>          share
12/16/2019  10:03 AM    <DIR>          var
              8 File(s)            951 bytes
              10 Dir(s)  392,685,903,872 bytes free

C:\Users\SteveK\Downloads\FusionInventory-Agent>



Here is excerpt of the agent.cfg file:

# Target definition options
#

# send tasks results to an OCS server
#server = http://server.domain.com/ocsinventory
# send tasks results to a FusionInventory for GLPI server
#server = http://server.domain.com/glpi/plugins/fusioninventory/
# write tasks results in a directory
local = /tmp

Here is the command:

C:\Users\SteveK\Downloads\FusionInventory-Agent>fusioninventory-agent --local /tmp1.xml

It says it saves, but not a valid file.  I tried as html, but will not open in any browser.

Can someone explain what I am doing wrong?


Thanks
  Reply
#2
Hi RCEit,

the --local argument should be a valid folder, not the expected file. The filename should be show at some time during the run.

The agent just tells you "/tmp1.xml" is not an existing folder.
  Reply
#3
(2020-10-16, 11:19:55)gbougard Wrote: Hi RCEit,

the --local argument should be a valid folder, not the expected file. The filename should be show at some time during the run.

The agent just tells you "/tmp1.xml" is not an existing folder.

[b]gbougard,[/b]

Thank you so much for your assistance!

here are the steps I did to create the file:

1.  opened CMD as admin
2.  cd C:\Program Files\FusionInventory-Agent\
3.  ran the command as such:

C:     fusioninventory-agent.bat  --html --local /ITstuff

it saved as html file and opens great.

is there a way i can save to say csv; pdf, or another?  Or am I restricted to html only?

Again, thanks for your  help!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)