12.12. Viewing Object Metadata
Problem
You want to view metadata
for an object. The
object’s replPropertyMetaData
attribute stores metadata information about the most recent updates
to every attribute that has been set on the object.
Solution
Using a graphical user interface
Open LDP.
From the menu, select Connection → Connect.
For Server, enter the name of a domain controller or domain that contains the object.
For Port, enter 389.
Click OK.
From the menu, select Connection → Bind.
Enter credentials (if necessary) of a user that can view the object.
Click OK.
From the menu, select Browse → Replication → View Metadata.
For Object DN, type the distinguished name of the object you want to view.
Click OK.
Using a command-line interface
In the following command,
replace
<ObjectDN> with the distinguished
name of the object for which you want to view metadata:
> repadmin /showobjmeta <DomainControllerName> <ObjectDN>
This command was called /showmeta in the Windows
2000 version of repadmin. Also, the parameters are
switched in that version, where
<ObjectDN> comes before
<DomainControllerName>.
Using VBScript
' This code displays the meta data for the specified object. ' ------ SCRIPT CONFIGURATION ------ strObjectDN = "<ObjectDN>" ' e.g. dc=rallencorp,dc=com strDC = "<DomainControllerName>" ' e.g. dc1 ' ------ END CONFIGURATION --------- set objIadsTools = CreateObject("IADsTools.DCFunctions") intRes = objIadsTools.GetMetaData(Cstr(strDC),Cstr(strObjectDN),0) if intRes = -1 then Wscript.Echo objIadsTools.LastErrorText ...