Microsoft KB Archive/253528

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 12:52, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base

Using the $Search() Function in a Management Agent of Microsoft Metadirectory Services

Article ID: 253528

Article Last Modified on 11/1/2006


  • Microsoft Metadirectory Services 2.1

This article was previously published under Q253528


Prior to Microsoft Metadirectory Services 2.1 when the metascript $Search() function performed a search and found zero or multiple matches, it would return a null value. This mechanism was unsatisfactory in situations where you needed to determine the uniqueness of an entry based on a search criterion.


The $search() function would return a NULL value if more than one entry was located by the search. A new argument, returnArbitraryResponse, was added to signal the fact that more than one entry was located. This now provides a means to determine the uniqueness of entries matching a particular search criterion.


To resolve this issue, this $search() functionality was modified in MMS 2.1. Upgrade to Microsoft Metadirectory Services 2.1 to receive this modification.


The $search() function has been modified. The new syntax to this function is:

$search(whatToSearch, scope, base, returnArbitraryResponse)

Where returnArbitraryResponse is optional and has a default value of NULL for backward compatibility. If returnArbitraryResponse is set to "arbitrary", the $search() function returns an arbitrary set of search results when multiple responses are found; it will no longer return a NULL. Management Agent developers can then use this argument to signal that more than one match was found, and that the entry being searched for is not unique.

No changes are required for existing templates if you do not require this functionality.

Additional query words: Importt, Management Agents, Agent Functions, MMS

Keywords: kbprb KB253528