Announcement

Collapse
No announcement yet.

WMI Win32_SystemEnclosure Array

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

  • WMI Win32_SystemEnclosure Array

    I would like to export only the first value in the Win32_SystemEnclosure "Chassis Type" Array. Notebooks can have more than one value in the array, I only want the first value. Can I do this? Perhaps with a 'Where' Clause...

  • #2
    Re: WMI Win32_SystemEnclosure Array

    WMI does not have any way to limit the number of instances returned, but if you specify a where condition, then you can limit it to any instance that matches. So you would need to determine if there is some specific property to the 'first' one that you want to find and return.
    Kevin Stanush
    SystemTools Software Inc.

    Comment


    • #3
      Re: WMI Win32_SystemEnclosure Array

      The only thing returned is a numeric value 1-24 & the second, third values and so on... would be in the same range of the first numeric values.
      Exporter can't just read the first value in the array & discard the rest before it writes that line. I suppose you have the Export file open all the time and output everything & you don't open and close that file....

      Comment


      • #4
        Re: WMI Win32_SystemEnclosure Array

        There isn't an 'array', but rather WMI returning information one record at a time. There isn't any certainty that the 'first' entry will be the 'first' entry from one computer to the next. The only way to limit this would be for an option to be added to return a certain maximum number of instances, but this has never been requested before.

        If you import the data into Access, you can write a query to group by computer name and return the 'First' or 'Last' item.
        Kevin Stanush
        SystemTools Software Inc.

        Comment

        Working...
        X