Data.Get.ND.Find
Top  Previous  Next


Searches Novell Directory and fills the [Data] section with any combination of properties for matching objects

Requirements
·NetWare client on the local machine, log on as admin  
·Novell controls  

Category
Data section

Script section
All

Data.Get.ND.Find Container, ObjectType, SearchFilter, IncludeSubContainers, ListOfProperties [,Add]

Container
Full ND path to container to search  

ObjectType
Type of object to find  
Options: User | Group  

SearchFilter
Format: property=value  
 
Examples  
SearchFilter
Description
cn=*
All objects*
surname=ste*
All objects* where first name starts with "ste"
telephone number=67*
All objects* where telephone number starts with "67"
internet eMail address=*@acme.com
All objects* where email address ends with "@acme.com"
 
*) of selected object type  

IncludeSubContainers

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

ListOfProperties

List of properties and destination columns, Format: NDpropertyName§Column§[NDpropertyName§Column§].  
 
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.  

"Data.Get.ND" also returns one none-standard ND property -  
·NDSpath = full NDS path to object (use with Novell commands such as Nov.DS.Object.SetProperty)  

Add [Optional parameter]
Options: Add |  
·Add - Add data at the end of the [Data] section instead of replacing the entire [Data] section. This is useful when more than one Data.Get.ND.Find command is used to get data from several different trees or containers.  

Examples

1) Search tree "OAK" for users where login is disabled. Put NDSpath of matching objects in [Data] column 1.

[Init_Batch_Begin] 
Data.Get.ND.Find OAK,user,login disabled=true,yes,NDSpath§1§
[Init_Batch_End]


2) Search tree "OAK", context MyOrg.MyOU for users where email address ends with "@acme.com". Put NDSpath of matching objects in [Data] column 1 and email address in column 2.

[Init_Batch_Begin]
Data.Get.ND.Find OAK\MyOrg\MyOU,user,internet eMail address=*@acme.com,yes,NDSpath§1
§internet eMail address§2
§
[Init_Batch_End]

3) Search tree "OAK" for users where profile is "MyProfile". Put NDSpath of matching objects in [Data] column 1.

[Init_Batch_Begin]
Data.Get.ND.Find OAK,user,profile=*MyProfile,yes,NDSpath§1
§
[Init_Batch_End]