Namespaces, ProgIDs, and ADsPaths
To reference different types of servers (e.g., Windows NT 4.0, NetWare, etc.) with ADSI, you must use the namespaces that correspond to the ADSI providers used by that directory service. ADSI uses a unique prefix called a ProgID to distinguish between these namespaces. Each ProgID is synonymous with a particular namespace and directory provider.
In a script, you specify the ProgID at the beginning of the object reference. The ProgID is used behind the scenes to correctly connect and bind to the corresponding directory service. For example, you specify WinNT:// to access individual Windows NT 3.51, 4.0, Windows 2000, and Windows Server 2003 systems while you use LDAP:// to access Active Directory and other LDAP directories. When ADSI encounters the ProgID, ADSI loads an appropriate ADSI-provider DLL to correctly process the bind request and method invocations.
ProgIDs are case-sensitive. WinNT:// will work, whereas WINNT:// will not.
Telling ADSI you want to bind via a particular namespace isn't enough. You also need to reference the object that you want to access in that namespace. A unique identifier known as an ADsPath can be used to reference each object in a namespace. Take, for example, the following WinNT namespace ADsPaths.
These two reference JoeB, a user in DOMAIN:
WinNT://DOMAIN/JoeB WinNT://DOMAIN/JoeB, User
These two reference COMP12345, a computer in DOMAIN:
WinNT://DOMAIN/COMP12345 WinNT://DOMAIN/COMP12345, Computer
These two reference ...