Schedule Active Directory Export to Excel using SQLLDAP Select Statement

Home | Tutorials | Compare

 

This tutorial explains how to schedule active directory export to excel using SQLLDAP Select Statement.

To export data first connect to the active directory server (To create a new connection please see Connecting to Active Directory remotely )

After successful connection, select the SQL button from the top menu, this will open the sql tab where you can enter the sql statements.

 

Active Directory select statement

 

To export all records from container CN=Users,DC=ldapsoft,DC=local, enter a sql statement as:

SELECT FROM CN=Users,DC=ldapsoft,DC=local
subtreescope

and also increase the Max Results to 0 (no limit)

 

 

Now Click the Export button, select the excel format radio button, enter the name of the export file, select the 'Export DN' and 'Export Operational Attributes' and then click on the 'Schedule this Export' link.

 

 

If you are using Simple Authentication, make sure that the save password box is checked and the credentials are admin credentials or credentials with password set to never expire otherwise task will fail when the credentials will expire. Click Next to continue.

 


 

If you want scheduler to write to a file, check the 'Write to a file' button and provide the file name and file name prefix date time format. Make sure you check the 'Replace File if exists' if you are using simple date time format like (mmddyy) and plan to run this task more than once a day. Click Next to continue.

 

LDAP Excel Export Page 3

Options

Description

Write To a File

Check the box if you want the scheduler to write the data to a file

Directory

Full path to the directory were scheduler will create the file

FileName

Name of the file to create and write data to

Prefix with DateTime

Check this box if you want the filename to be prefixed with the datetime stamp, select the format from the drop down

Replace File if Exists

Check this box if you want file to be overwritten or else you will get an error if file exists.

 

Check the 'Send Email' box if you want to send email after the scheduled process is over and/ or want to send file as an attachment. Enter the necessary information and Click Next


Scheduler LDAP Export to Excel Step 3

Options

Description

SMTP Host Name

This is the SMTP server to connect to.
If your SMTP server requires username and password to connect - click the options.. and enter the default username and password.

Attach file to email

Check this box, if you want to send the file as an attachment

From

From Email Address

To

Comma separated list of addresses to send the email to

CC

Comma separated list of addresses to cc this email to

Subject

Subject of the email

Append DateTime

Check this box if you want date to be appended to the subject, select the format from the drop down.

Message

Email Message

Append System and Error Messages

Check this box if you want system and error messages to be appended to the email message.

 

Enter a unique name for this task, select the text after header from the text box, open a command/terminal window, paste the text and click enter. Once you are satisfied with the results, create a scheduler task using windows scheduler or Linux cron. Click Finish to save this task.



Scheduler LDAP Export to Excel Step 3

Options

Description

Job Name

Enter a unique name for this task

 

See Also:

How to schedule task using Windows scheduler
How to schedule task using Linux cron
Query LDAP Using Select Statements