Microsoft KB Archive/311149

= Using the Report Management Agent and Cdir_ldp.exe to Perform a Bulk Reset of Metaverse Attributes =

Article ID: 311149

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.1
 * Microsoft Metadirectory Services 2.2 Service Pack 1
 * Microsoft Metadirectory Services 2.2 Service Pack 1

-



This article was previously published under Q311149



SUMMARY
If you have to reset or modify attributes in the metaverse, you may find it time consuming to use a single object tool, such as Ldp.exe, to perform this task. To quickly change multiple records in the metaverse, you can use the record selection and output format capabilities of the Report management agent to feed information to Cdir_ldp.exe, and then use the modification capabilities of Cdir_ldp.exe. If you do so, you do not add the extra cost of an associated connector space.



MORE INFORMATION
The example that is described in this section assumes that the selected metaverse objects contain a single-valued attribute called favoriteColour and that you are using this management agent to select the person objects that have midnight black value in the favoriteColour attribute, and then change the value for these objects to bright sunshine.

NOTE: This example assumes that you are modifying single-valued attributes. This example does not describe how to update multiple-lined or multiple-valued attributes. Additionally, use this example only as a one-time operation so that you can avoid manually resetting an attribute in a metaverse or connector space. However, if you want to modify attributes in this manner on a continuous basis, Microsoft recommends that you code a generic management agent. You can use this newly coded management agent as part of your overall metadirectory implementation.

To use the Report management agent to change multiple records in the metaverse:  Log on to Microsoft Metadirectory Services (MMS) as an administrator. Click Bookmarks in the left pane, and then click Management Agents. Click Actions in the left pane, and then click Create New Management Agent. Give the management agent an appropriate name, for example Q311149 Test Report MA . In the Type of Management Agent box, click Report Management Agent. Click Create.  On the Inclusions and Exclusions tab, modify condition 01 so that it matches the following data: condition 01 $mv_object_class(&quot;zcperson&quot;) = TRUE $mv.favoriteColour = midnight black </li> Click Actions in the left pane, and then click Design MA.</li> Click the Design Report Format tab, and then click Report Format.</li> Click the Header tab, and then remove the header template contents.</li> Click the Trailer tab, and then remove the trailer.</li>  Click Add, and then change the template data so that it matches the following data: M $mv.dn -favoriteColour: bright sunshine --- NOTE: Make sure to include a carriage return or a line feed at the end of the line that has the three en dashes (-). If you do so, each record begins on a new line.

You must make these changes on the Add template because the Report management agent only sees the selected objects as Add candidates. Even though you want to modify metaverse objects, you do not use the Modify template. </li> Click OK.</li> Click Actions in the left pane, and then click Operate MA.</li> Record the path of the Zscript.log file.</li> Click Generate Report, and then review the Export file in the management agent's working folder to make sure that all of the correct objects were selected and that the information pertaining to each object is correct and properly formatted.</li> Repeat steps 1 through 3.</li> Give the management agent an appropriate name, for example Q311149 CDIR_LDP Update MA .</li> In the Type of Management Agent box, click Netscape LDAP Management Agent.</li> Click Create.</li> Click Actions in the left pane, and then click Configure MA.</li> Click the Discovery tab.</li> <li>In LDAP server address/name box, type the name of the MMS server, for example mms1.microsoft.com .</li> <li>In the LDAP TCP/IP port box, type the correct LDAP port number for the MMS server.

This value is located in the upper right corner of the MMS snap-in.</li> <li>Leave the Context Prefix box blank.</li> <li>In the Login as box, type the complete MMS distinguished name (DN) of the MMS server (for example, type cn=Administrator,dsaname=mms1 ).</li> <li>In the Password box, type the administrator's password.</li> <li>Click Test your configuration.

This test must be successful before you go to the next step.</li> <li>Click the Foreign Users tab, type the DN of the top object of the tree in the Foreign user's organizational unit box (for example, type dc=com if your naming context is similar to dc=microsoft,dc=com).</li> <li>Click the Attributes to discover tab, view the Attributes Discovered list, and then make sure that all of the attributes that are referenced in the Add template of the Report management agent are listed.

In this example, the only required attribute is favoriteColour. If you have to add any attributes, add them to the end of the list.</li> <li>Click OK.</li> <li>Click Actions in the left pane, and then click Design MA.</li> <li>Click the MA Control MA Operations tab, and then click the MA Control Script tab.</li> <li> Scroll through the template code to the section that begins with the following instructions: IF %zcDsPerformForeignUpdates% = TRUE THEN </li> <li> Type a number sign (#) at the left margin of the line that begins with the following text: EXECUTE importt -updateDib -populator/update, </li> <li>Click OK.</li> <li>Click Actions in the left pane, and then click Operate MA.</li> <li>Click the Operational Settings tab.</li> <li>In the Tasks To Run group, click only Update connected directory.</li> <li>In the Types of Objects to Process group, click only Process foreign users.</li> <li>Click the Management Agent Logs tab, and then click the Operator's Log tab.</li> <li>Record the path of the Zscript.log file</li> <li>Copy the Export file from the Report management agent's working folder to the Netscape working folder.

Make sure that the file is still named Export.</li> <li>Click Run the Management Agent.</li></ol>

To configure the Report management agent to process the metaverse connector spaces: <ol> <li>Click Actions in the left pane, and then click Design MA.</li> <li>Click the Design Report Format tab, and then click the Report Control Script tab.</li> <li> Modify the template code which calls &quot;importt&quot; so that it matches the following text: EXECUTE importt -updateDib -populateDsa -populator/update -currentDn &quot;%dn%&quot; + -logFileName %zcDsDirectory%\dsforn.log </li> <li>Click OK.</li></ol>
 * 1) Generate the report

Additional query words: mms metadirectory zoomit

Keywords: kbinfo KB311149

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.