Each object in a directory has a series of attributes, or properties, that uniquely define it. Although properties can vary from object to object, ADSI supports the manipulation of a core set of six properties common to all objects using the IADs interface. These properties are common to all objects because IADs is the most basic interface in ADSI.
The IADs properties are as follows:
The object’s schema class
The object’s Globally Unique ID (GUID)
The object’s name
The ADsPath to the object in the current namespace
The ADsPath to the object’s parent
The ADsPath to the object’s schema class
Each of these properties has a corresponding property method in the IADs interface. You can use the property method, which has the same name as the property, to access that property’s value. Example 19-1 contains code to display the six IADs properties for a user object.
Example 19-1. Using the explicit property methods to display the six IADs properties
Dim objUser 'An ADSI User object Dim str 'A text string ` User object using the WinNT namespace Set objUser=GetObject("WinNT://MYCORP/Administrator,User") str = "Name: " & objUser.Name & vbCrLf str = str & "GUID: " & objUser.GUID & vbCrLf str = str & "Class: " & objUser.Class & vbCrLf str = str & "ADsPath: " & objUser.ADsPath & vbCrLf str = str & "Parent: " & objUser.Parent & vbCrLf str = str & "Schema: " & objUser.Schema & vbCrLf & vbCrLf Set objUser = Nothing ...