Generating Default Values

Note  This default attribute generation feature behaves as described here only in Microsoft Exchange Server version 5.0 (RC1) or later versions.

If the Display-Name, Mail-Nickname, and Assoc-NT-Account attributes are not specified in an import file, the directory access import functions construct default values for them. This generation of default values resembles that used by the Auto Naming feature of the Microsoft Exchange Server Administrator program. (Choose Options from the Tools menu, and then click the Auto Naming tab to see how Display name and Alias name strings are to be generated.) This generation occurs only for creation (import), and not for entry modification.

Default values are generated in this way:

  1. When DAPIStart or BatchImport are called, the Auto Naming format strings for generating Display-Name and Alias-Names are read and extracted from the Windows NT Registry. Data is stored in the registry on a per-administrator basis, which means that results may vary if the import is performed when different administrators are logged on.
  2. If these values are not specified, are not readable, or are specified as constant literal strings, default format strings are used. These are: DispName <= "%First %Last" and AliasName <= "%First%1Last".
  3. For each entry created through BatchImport or DAPIWrite, if there is no value specified for Display-Name or Mail-Nickname, a default value is constructed according to the rule obtained in step 1 or step 2. If the result of this construction contains no substituted text (that is, it resolves to a constant literal string), the Common-Name is used.

If no value is specified for either the Assoc-NT-Account attribute or the Obj-User attribute, the Mail-Nickname is used — either as specified or as constructed.

If the Common-Name (Directory Name) attribute is not specified, it will be defaulted to the Alias-Name or constructed according to the rule obtained in step 1 or step 2. If a value cannot be obtained for Common-Name, an error is logged.

In this import operation, the directory is not checked for duplicate Display-Names or duplicate e-mail names.