NDpathFind
Top  Previous  Next


Finds out NDS path for an object from any unique eDirectory property

An empty string is returned if there are no match or more than one match (first three matches are displayed in log window).

Use the NDS path with Novell commands such as Nov.DS.Object.SetProperty

NDpathFind (Container, ObjectType, SearchFilter, IncludeSubContainers)

Container
Full NDSpath to container to search  

ObjectType
Type of object to find  
Options: User | Group  

SearchFilter
Format: property=value  
 
Examples  
SearchFilter
Description
cn=steve
The object "steve".
surname=steve
The object with surname "steve"
telephone number=1234567
The object with telephone number "1234567"
internet eMail address=steve@acme.com
The object with email address "steve@acme.com"
 
 
The easiest way to find out correct property names for accounts is probably to use SetupExplorer, see How to display all existing properties for one account.  

IncludeSubContainers

Options: Yes | No  
·Yes - objects in subcontainers should be included in search  
·No - objects in subcontainers should not be included in search  

Examples
Find NDSPath from telephone number

Set
 ObjectPath=NDpathFind (OAK,user,telephone number=1234567,Yes)
If "%ObjectPath%"<> Then
 MessageBox %ObjectPath%   
Else   
 MessageBox Not found
EndIf

Find NDSpath from telephone number, use NDSpath to find out email address

Set
 ObjectPath=NDpathFind (OAK\MyOrg\MyOU,user,telephone number=1234567,Yes)
If "%ObjectPath%"<> Then   
 Set Email=NDValue (%ObjectPath%,Internet EMail Address)   
 MessageBox %Email%   
Else   
 MessageBox NDSpath not found
EndIf