Creating an Attribute by Using a NOIDMIF File

The most common way to use a NOIDMIF file is to create a new attribute that cannot be collected with inventory, and then store it in the SMS site database. For example, before SMS 2.0 was installed on their network, Wide World Importers catalogued each computer in the organization by using a company-assigned asset number. These numbers were assigned and collected by hand. With SMS, administrators from Wide World Importers can use a NOIDMIF file to add the asset number for each client computer to its other information within the SMS site database, so that it can be available for queries and asset management. Because the asset number can then be associated with collected inventory properties, much more information is always available to administrators. The following sample NOIDMIF file, whose format (created by Wide World Importers to add a class called Wide World Asset Numbers to the record for a client) is similar to the format of a NOIDMIF file that adds a single attribute, illustrates this process:

Start Component   Name = "System Information"   Start Group      Name  = "Wide World Asset Numbers"      ID    = 1      Class = "wideWorldAssetNumbers"      Key = 1      Start Attribute         Name    = "Computer Asset Number"         ID      = 1         Type    = String(10)         Value   = "414207"      End Attribute   End GroupEnd Component


Note   The value is stored as a string because commas are automatically inserted in values with the integer data type. If it were stored as an integer, the asset number’s value would change.


You can create NOIDMIF files by using the MIFgen tool provided on the Microsoft BackOffice 4.5 Resource Kit CD-ROM, or you can create them by using any text editor. For more information about MIFgen, see Chapter 13, “Using SMS 2.0 Tools — Part 1,” and Chapter 14, “Using SMS 2.0 Tools — Part 2.”

To create such a NOIDMIF file, use the following procedure.

Procedure Bullet  To create a NOIDMIF file to add the Wide World Asset Numbers class

  1. Type the following line to begin the NOIDMIF file:
  2. Start Component

    You must always add a component and name the component when you create a NOIDMIF file.

  3. Type the following line to name the component:
  4. Name = "System Information"

    By using a general name such as System Information, you make this component more flexible. You can then use it to add any information you want to maintain for this client by adding new groups to the existing NOIDMIF file.

  5. Type the following line to add the Display Name for the new Wide World Asset Numbers class:
  6. Start Group    Name = "Wide World Asset Numbers"

    The Name attribute is the string that administrators will see in Resource Explorer to refer to this class. Wide World Asset Numbers is a DMTF group class. When the SMS Provider sees this group, it creates a WMI class called SMS_g_wide_world_asset_numbers.

    After you add attributes, even if you add only a single attribute, you need to add a group to contain your new attributes.

  7. Type the following line to give the Wide World Asset Numbers class a group ID number:
  8. ID = 1

    You can use any method to determine the ID number for each group and attribute, so long as the number is unique for groups within this component.

  9. Type the following line to add the wideWorldAssetNumbers class:
  10. Class = "wideWorldAssetNumbers"

    The Class information is used for processing and is never seen by administrators.

  11. Type the following line to add the key attribute:
  12. Key = 1

    This entry indicates that the first attribute listed is the key. Key attributes are unique attributes that identify instances of a certain class. Whenever you have more than one instance of a class, you must include at least one key attribute, or the subsequent instances of the class will overwrite the previous instances. If no key attributes are defined for a NOIDMIF file on a 32-bit system, all the attributes will be designated as key by the inventory process. This does not occur for IDMIF files or for 16-bit NOIDMIF files.

  13. Type the following lines to add the first attribute:
  14. Start Attribute    Name = "Wide World Asset Number"    ID = 1    Type = String(10)    Value = "414207"End Attribute

    You must set an ID number for this attribute, name the attribute, and then specify a data type. The ID number you choose must be unique within the group. Only three data types are recognized by the system: integer, string, and specially formatted datetime string. (For more information about data types, see Appendix C, “Hardware Inventory Classes.”) You must also specify a valid value for the data type you selected.

When you use a NOIDMIF file to define a new class, the class is inventoried at the next cycle, because the NOIDMIF file is processed on the client.

When you customize hardware inventory by using NOIDMIF files, you must leave the NOIDMIF in the target directory on the client. The custom MIF file is used at each hardware inventory cycle when the extended classes and attributes are collected. If the NOIDMIF file is not found on the client during hardware inventory, the extended classes and attributes are deleted and you must submit the NOIDMIF file again by replacing it in the Noidmifs directory on the client.

Because the NOIDMIF file creates classes and attributes that are not part of discovery, they cannot be automatically updated by inventory. When you need to update an attribute that was created with a NOIDMIF file, you can do so by updating the existing NOIDMIF file with a different value for the attribute.

After Wide World Importers created their NOIDMIF file to add the asset number to a client, the next step is to extend the procedure to every client within the organization. For more information, see “Customizing More Than One Client” later in this chapter.