Welcome E-Mail for O365

Hello All,

Here is a helpful script I have created to send welcome e-mail’s out to anyone new in your active directory.  You can configure it to your liking and then add it to task scheduler.


$When = ((Get-Date).AddDays(-1)).Date
$messageBody = "Your Message goes Here"
Get-ADUser -Filter {whenCreated -ge $When -and mail -like "*"} -Properties whenCreated, mail | foreach {
 Send-MailMessage -From helpdesk@domain.com -To $_.mail -subject "Welcome to the company!" -SmtpServer server.domain.com -Body $messageBody -BodyAsHtml



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>