Learn how to a build a cloud-first strategyRegister Now


Automating emails from AD

Posted on 2007-10-17
Medium Priority
Last Modified: 2010-03-06
Is it possible to create a script, or install a program, which will send an email when a new user is created in Active Directory?
When we set up a user, we have to send an email to our head office to create an aliase entry in thier mail server. Sendmail used to work with older versions of Exchange, but not with Exchange 2003.
Question by:sapa44
  • 3
  • 2
LVL 76

Expert Comment

by:David Lee
ID: 20115896
Hi, sapa44.

This would require a service or program that would constantly monitor AD watching for new accounts being created.  It's not impossible, but I'm not aware of any built-in means of doing this.  A different approach would be to use a script to create the new accounts and in that script include a routine for sending the email.  That actually seems to me like a much better approach since it provides a means for handling other automatic tasks associated with creating a new account.  

Author Comment

ID: 20121382

Thanks for the reply, I did think it might have to be a script. Any ideas as to how difficult this script would be? If its an big job I will have to grin and bear it the manual way.
LVL 76

Accepted Solution

David Lee earned 750 total points
ID: 20127870
It's not very diffuclt.  Something like the script on this page: http://www.jsifaq.com/SF/Tips/Tip.aspx?id=5297
Of course you can do more than what's shown here.  You can fill in pretty much any AD user account property, create a mailbox, create a home directory and set permissions on it, add teh account to various groups, etc.  The only limit is figuring out how to script a particular action.  

Author Comment

ID: 20129149
Thanks for your help, that looks like what I'm after. Will need to play with the script I think to get the right result.
LVL 76

Expert Comment

by:David Lee
ID: 20134719
You're welcome.

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question