Windows to Novell
Top  Previous  Next


[Settings_Begin]
BatchSettings.Delimiter=;
BatchSettings.MarkerCol=12
BatchSettings.MarkersAutoRemove=Yes

SET ADDomainPath=dc=com/dc=acme/dc=D31
SET NDPath=OAK\MyOrg\MyOU
[Settings_End]

[Machines_Begin]
\\MAIN04
[Machines_End]

[Init_Batch_Begin]
// Get data from AD   
Data.Get.AD Container,%ADDomainPath%,User,Yes,ADpath§1§mail§3§givenName§4§Initials§5§sn§6§telephoneNumber§7§   
// Use email address property to find ND path (email must be same in both Novell and Windows)   
SET Found=0   
SET Failed=0   
Data.Loop   
 Set ObjectPath=NDpathFind (%NDPath%,user,Internet EMail Address=%col3%,Yes)   
 If "%ObjectPath%"<> Then   
   // if ND path found - write it in second column, increase number of found counter   
  Data.Write 2, %ObjectPath%   
  inc (%Found%)   
 Else   
  // if ND path not found - write "Failed" in second column, increase number of failed counter   
  Data.Write 2, Failed   
  inc (%Failed%)   
 EndIf   
Data.Endloop   
// User feedback   
if %Found%=0 then   
  MessageBox "Sorry, no accounts found".   
  QuitBatch   
Else   
 MessageBox "%Found% found, %Failed% not found, continue?", Ask   
 IF %LastMessageBox%<>Yes Then   
  QuitBatch   
 EndIf   
EndIf   
[Init_Batch_End]

[Batch_Begin]
// Use ND path in second column to write data to Novell directory   
Data.Loop   
 SET ObjectPath=%col2%   
 if "%ObjectPath%"<>Failed Then   
  Nov.DS.Object.SetProperty %ObjectPath%, Given name, %col4%   
  Nov.DS.Object.SetProperty %ObjectPath%, Surname, %col6%   
  Nov.DS.Object.SetProperty %ObjectPath%, Initials, %col5%   
  Nov.DS.Object.SetProperty %ObjectPath%, Telephone Number, %col7%   
 EndIf   
Data.Endloop   
[Batch_End]

[Data_Begin]
[Data_End]