Before you can start writing scripts that use ADSI, you first need to understand the basic COM concept of interfaces and ADSI’s concepts of namespaces, programmatic identifiers (ProgIDs), and ADsPaths.
A COM interface defines the properties associated with an item, how to access those properties, and how to access specific functionality of the item, more commonly referred to as an object. For example, WSH has a number of objects that represent files, shortcuts, network access, and so on. ADSI provides a specification for interfaces that each directory service provider must implement to maintain uniformity. Each ADSI interface normally supports methods that can be called to perform a specific action, and properties (or property methods) to retrieve information about the object.
A method is a
procedure or function that is defined on an object and interacts with
the object. So an interface to access Active Directory group objects
methods, so that members could be added or removed from a group.
Methods are normally represented as
Interface::MethodName when referenced, and this is
the form we adopt in this book. Objects also have properties that are
retrieved using the
IADs::GetEx methods and set or replaced using the
Each ADSI object supports an IADs interface that provides six basic pieces of information about that object:
Relative name for the object (RDN in the case of Active Directory) ...