Announcement

Collapse
No announcement yet.

Running a Simple Command Line Tool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running a Simple Command Line Tool

    So, I'm a newbie sorta, and am trying to simply do a "srvinfo" on several of my machines. I've setup a new Tool, the command line is:

    srvinfo \\%S%

    I've played with putting in the full path to the command, but everytime i run it i get the following error:

    No server is available to process the command.

    Help!

  • #2
    Re: Running a Simple Command Line Tool

    Trying changing it to this:

    cmd /x /c srvinfo %E%

    Comment


    • #3
      Re: Running a Simple Command Line Tool

      Thank you - that sorta works, but where does the output go? I tried specifying a file:
      cmd /x /c srvinfo %E% >>c:\file.txt
      but it didn't work. Thoughts?

      Comment


      • #4
        Re: Running a Simple Command Line Tool

        Put an &pause on the end of the command:

        cmd /x /c srvinfo %E% &pause

        That should pause the window so you can see if there is any output or errors.

        Comment


        • #5
          Re: Running a Simple Command Line Tool

          So, I only get following on any machine when i run it (just the usage info basically):

          SrvInfo
          Version 3.00.10
          ================================================== ===
          Remotely gather information about a target server.
          Assume local machine if no computer name is provided.
          ================================================== ===

          Usage: SRVINFO [[-?|-ns|-d|-v|-s] \\computer_name]
          -?: Show usage
          -ns: Do NOT show any service information
          -nf: Do NOT show any hotfix information
          -r: Show service internal names
          -d: Show service drivers and service
          -v: Get version info for Exchange, IIS, SQL
          -s: Show shares
          Press any key to continue . . .

          Comment


          • #6
            Re: Running a Simple Command Line Tool

            But ultimately I need the info piped to a file as I need to collect info on several of these machines.

            Comment


            • #7
              Re: Running a Simple Command Line Tool

              It looks like you don't have the right syntax for the utility. You'll need to figure that out first, then you can work on piping the output to a file.

              From the instructions it gives you, it looks like you need \\ in front of the computer name. Change your command to this and see what you get:

              cmd /x /c srvinfo \\%E% &pause

              Comment


              • #8
                Re: Running a Simple Command Line Tool

                Thanks much - that "whack whack" gets ya everytime, doesn't it? Data is being collected now and written to a file.

                So, may I push my luck and ask if this is the best way to retrieve system info on 100+ machines? I'm collecting mainly OS, patch level, stuff like that.

                Comment


                • #9
                  Re: Running a Simple Command Line Tool

                  You can also use Exporter Pro for this. You would select your domain, or a selection of computers, then choose Tools->Exporter Pro->Export Selected Objects. Click the Settings button then configure it to output the information you are looking for.

                  Comment


                  • #10
                    Re: Running a Simple Command Line Tool

                    seems i need to change the path in the registry that hyena is using to call the exporter - it's wrong. BUT, i am running it as standalone, and so far - wow. I owe you one, thanks for all your help. I'm sure I'll be chatting with you again soon .

                    Comment

                    Working...
                    X