Announcement

Collapse
No announcement yet.

HPDISCOVERY - Syntax Help

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

  • HPDISCOVERY - Syntax Help

    First off, if anyone has a more efficient way to gather HP/Compaq System Info w/o loading OV or some other purchased client - I'm all ears.

    All I want to do is pull the Model Type of all my HP/Compaq servers. It's the "SystemName" component.

    Nothing else I've found will pull this info - I just need to be able to script it.

    Any help is appreciated.

    Thanks,
    h

  • #2
    Re: HPDISCOVERY - Syntax Help

    This is the script I use for reading computer type and model. The results are written in a text file.
    See if it helps you in any way...

    Code:
    On Error Resume Next
    
    Const FOR_READING = 1
    Const FOR_WRITING = 2
    Const FOR_APPENDING = 8
    
    strComputer = "."
    dataArr =""
    delim = ","
    
    set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
    For Each objItem In colItems
       dataArr = dataArr & Trim(objItem.Name) & delim & Trim(objItem.Model) & delim
    Next
    
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile _
     ("\\server\sharename\file.csv", FOR_APPENDING, True)
    
    objFile.Write vbCrLf & dataArr 
    
    objFile.Close

    Sorin Solomon


    In order to succeed, your desire for success should be greater than your fear of failure.
    -

    Comment


    • #3
      Re: HPDISCOVERY - Syntax Help

      Thanks a lot Sorin! That works fine against a single server.
      I need to be able to run it against a whole domain. I've been toying with using psexec and the like. I can't use login or GPO scripts, btw.

      I appreciate your expertise - Any thoughts here?

      -h

      Comment


      • #4
        Re: HPDISCOVERY - Syntax Help

        I don't know... (not much expertise here, anyway )...
        What's the "no GPO or login scripts" story? You do have a domain, don't you?
        How many servers are we talking about?

        Sorin Solomon


        In order to succeed, your desire for success should be greater than your fear of failure.
        -

        Comment


        • #5
          Re: HPDISCOVERY - Syntax Help

          Sorry, we do have a domain - I'm just not allowed to edit/launch login scripts or GPO's - so, I have to "sneak around" to get the info I need.

          Thanks again, -h

          Comment


          • #6
            Re: HPDISCOVERY - Syntax Help

            How many servers/computers are we talking about?
            Do you have access to their console?

            Sorin Solomon


            In order to succeed, your desire for success should be greater than your fear of failure.
            -

            Comment


            • #7
              Re: HPDISCOVERY - Syntax Help

              If you have to "sneak around" to do something that is assumedly part of your job (it is, isn't it?), then I would talk w/ someone who doesn't have to "sneak around" and have them help you with this task.
              ** Remember to give credit where credit is due and leave reputation points where appropriate **

              Comment

              Working...
              X