Send email if user creation date matches current date

This script will check creation dates on all AD accounts, and send an email to any account whose creation date matches the current date.

This was specifically designed to be used as a scheduled task, running at the end of the day, in scenarios where you want to send a welcome email, but accounts are created through a process other than PowerShell.

While the script is currently only using the mail and whenCreated attributes, it also pulls the givenName and surname values if you want to use those in the email body.

Source Code

This script has not been checked by Spiceworks. Please understand the risks before using it.