Selecting Objects to Export

Although directory access functions do not provide generic filtering capabilities, you can use them to select objects (by query) to be exported from the directory, through the BatchExport function. To do this, you specify up to three attributes and the values they must contain for the object to be exported. These three attributes can be used as filtering criteria:

Note  Home-Server is a pseudo-attribute, which means it is not part of the directory schema, and can be used only by directory access functions. It was created so that you can define a list of servers for filtering the export operation, the same way you can filter changes by their relative update order with USN-Changed. For more information, see Using Directory Access Pseudo-Attributes.

The BatchExport function exports objects in all classes you specify. The export operation is then restricted by applying the USN-Changed and Home-Server filters. The BatchExport function does not let you filter objects with other attributes such as When-Changed and When-Created.

However, by providing a callback function you can do specialized filtering. Because data is passed to your callback function when it is called, you can filter on any criteria you want. You can then use those criteria to decide how to use the exported data, such as whether to write it to a file. Filtering objects or attributes in this manner involves overhead in reading the data from the directory information tree.

Importing objects does not involve filtering. All objects specified in the import file are imported.