Resolution
What is the syntax of the Onepoint path for enumerating various objects via the Directory and Resource Administrator (DRA) ADSI Provider?
fact
Directory and Resource Administrator 7.x
fix
The OnePoint path is specific to the Directory and Resource Administrator (DRA) ADSI provider. This path is similar to the standard LDAP path used to retrieve ADSI objects.
By default, Directory and Resource Administrator connects the client to the Administration server that manages the domain in which the logon user account resides. If the domain you want to manage is not handled by the default Administration server, you can specify the correct server in the OnePoint path for the managed object.
Example: To specify the AdminServer01 Administration server, which manages the Jack Jones user account in the central domain, you would use the following OnePoint path:
OnePoint://AdminServer01/cn=Jack Jones,cn=Users,dc=central,dc=com
The following provides example of OnePoint paths for common network and security objects:
- Object:user account
OnePoint Path Syntax: OnePoint://cn=<display name>,cn=<group name>,dc=<domain>,dc=<root domain>
OnePoint Path Example: OnePoint://cn=Jack Jones,cn=Users,dc=central,dc=com- Object: group
OnePoint Path Syntax: OnePoint://cn=<group name>,dc=<domain>,dc=<root domain>
OnePoint Path Example: OnePoint://cn=Users,dc=central,dc=com- Object: organizational unit
OnePoint Path Syntax: OnePoint://ou=<organizational unit>,dc=<domain>,dc=<root domain>
OnePoint Path Example: OnePoint://ou=Technical Support,dc=central,dc=com- Object: contact
OnePoint Path Syntax: OnePoint://cn=<contact name>,dc=<domain>,dc=<root domain>
OnePoint Path Example: OnePoint://cn=Julie Smith,dc=central,dc=com- Object: mailbox
OnePoint Path Syntax: OnePoint://cn=<mailbox name,cn=<computer name>,dc=<domain>,dc=<root domain>,module=exchange,mailbox
OnePoint Path Example: OnePoint://cn=Webmaster,cn=Exchange Server 01,dc=central,dc=com,module=exchange,mailbox- Object: computer
OnePoint Path Syntax: OnePoint://cn=<computer name>,dc=<domain>,dc=<root domain>
OnePoint Path Example: OnePoint://cn=Lab Computer,dc=central,dc=com- Object: resource
OnePoint Path Syntax: OnePoint://cn=<resource name>,cn=<computer name>,dc=<domain>,dc=<root domain>,module=resources,<resource type >
OnePoint Path Example: OnePoint://cn=SusanShare,cn=Susan Computer 01,dc=central,dc=com,module=resources,Share- Object: ActiveView
OnePoint Path Syntax: OnePoint://av=<ActiveView name>,module=security
OnePoint Path Example: OnePoint://av=Susan ActiveView,module=security
Example: Enumerating All User Accounts
To enumerate all user accounts in the Users container of the central domain, use the following Visual Basic code:
Dim objUser As IADs
Dim objContainer As IADs
Set objContainer = GetObject("OnePoint://cn=Users,DC=central,DC=com")
objContainer.Filter = Array("user")
For Each objUser in objContainer
Debug.Print objUser.Name
.
Next objUser
Example: Enumerating User Accounts in a Group
To enumerate all users in the Administrators group beginning with manager in the central domain, use the following Visual Basic code:
Dim objGroup, objGroupMember, objMembers
Set objGroup = GetObject("OnePoint://cn=Administrators,cn=Builtin,dc=central,dc=com")
Set objMembers = objGroup.Members
objMembers.Filter = Array("User(manager*)")
For Each objGroupMember in objMembers
Debug.Print objGroupMember.Name
Next objGroupMember
Example: Enumerating Specific Properties for All User Accounts
To enumerate the department and givenName properties for all members of the Users group in the central domain, use the following Visual Basic code
Dim objUser As IADs
Dim objContainer As IADs
Set objContainer = GetObject("OnePoint://cn=Users,DC=central,DC=com")
objContainer.Filter = Array("user.
")
objContainer.Hints = Array("department", "givenName")
For Each objUser in objContainer
Debug.Print objUser.Name, objUser.Get("department"), objUser.Get("givenName")
Next objUser
Example: Enumerating Service Resources
To enumerate all services on the adserverw2k computer with the WinNT provider, use the following Visual Basic code:
.Dim objService As IADs
Dim objComputer As IADsContainer
Set objComputer = GetObject("WinNT://adserverw2k,computer")
objComputer.Filter = Array("Service")
For Each objService in objComputer
Debug.Print objService.Name
Next objService