Set up email notification for ADC v1.5 status
You can set up email notifications for error messages and status messages for Active Directory Connector (ADC) events.
The following additional requirements are needed for this process: [n this case you must change the search filter for the messages in the event log.]
- SMTP(S) server (to send status information) -- SMTP service account (user/password) for sending emails (only if it's necessary for your SMTP server)
- SSL certificate -- May be required to connect to the SMTP server and Domain Controller securely (optional)
You can also Set up email notification for ADC errors.
Create a scheduled task in the Windows Task Scheduler
1. Open the Windows Task Scheduler ( Start > All Programs > Administrative Tools > Task Scheduler).
2. In the left navigation, select Task Scheduler Library > Event Viewer Tasks.
3. In the right navigation, select Create Basic Task.
4. Use the Create Basic Task Wizard to give the task a name and select when and how often it should start.
5. Select Send an email and click Next.
6. Fill out the From, To, Subject, Text, Attachment and SMTP server fields and click Next.
7. Click Finish to save your new task.
Specify when notification email is sent
1. In the Task Scheduler left navigation, select Task Scheduler Library > Event Viewer Tasks. A new task is created.
2. Right-click the new task and select Properties.
3. On the General tab, click Run with highest privileges.
4. On the Actions tab, create a new action by selecting New > Start a program > OK.
5. On the Actions tab, review the actions that will occur when your task starts. The following action is required; you can add, edit or delete as needed. Click OK when finished.
Filter event log and write file (daily_status.bat) – del %temp%\daily_status.txt wevtutil qe ADCSLog /q:"*[System[Provider[@Name='AD Conn'] and TimeCreated[timediff(@SystemTime) <= 86400000]]]" /f:text /rd:true > C:\temp\daily_status.txt
Email output example
Once successfully configured, the output will be attached to the email. The following is an example of a daily email status output:
2013-03-20 09:35:19,448 | Organizer Nan.Cobaldt-0000suffix@myCorp.com was created with G2T2013-03-20 09:35:18,077 | Status changed to suspended for user with organizerkey Perry.Waite-0005suffix@myCorp.com2013-03-20 09:35:16,555 | Organizer Perry.Waite-0005suffix@myCorp.com was created with G2T2013-03-20 09:35:15,152 | Organizer Vijay.Sudbra-0010suffix@myCorp.com was created with G2W2013-03-20 09:35:13,603 | Organizer Hector.Gomez-0011suffix@myCorp.com was created with G2W
26 users created successfully