Link to home
Start Free TrialLog in
Avatar of carbonbase
carbonbaseFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to send a welcome email to new mailboxes

Hi I've been searching online for a script to send a welcome email to newly created user mailboxes.  I've found this script:

https://github.com/12Knocksinna/Office365itpros/blob/master/SendWelcomeEmail.PS1

Just wondering how best to run it in an automated way.  It prompts for login details every time the script is run and errors with "You must call Connect-ExchangeOnline before call any other cmdlet"

Ideally I'd like the script to run each time a mailbox is created, but failing that at least twice a day.  Is this the best approach?  I've had a brief look at Azure functions as a possible alternative way of doing this but it's not clear to me whether that would be a viable option. Thanks.
Avatar of Saif Shaikh
Saif Shaikh
Flag of India image

carbonbase,

Are you creating the user account in on-premises Active Directory and then adding a license to the user in the cloud, or is this a 100% pure cloud only identity?

If it is an on-premises AD user that is synced to the cloud, there is a community script that was written that can send the email as part of the new account creation process, reference is here: https://community.spiceworks.com/scripts/show/3188-office-365-user-creation 
Apart from automating a "welcome" script, you might also consider informing your users when new functionality is rolled out, or simply remind them about some features exist. There's a built-in "wizard" as part of the O365 Admin portal that lets you do that: https://portal.office.com/adminportal/home#/iwwizard 

https://regarding365.com/using-the-office-365-adoption-wizard-11ee055fb160
Avatar of carbonbase

ASKER

Thanks Saif, my users are created in our on-premise AD and synced to the cloud.  At the moment we have a separate process for that which is part of our HR process.  I'm not sure that script is right for me, as all I want to do is sent a welcome email to new or recently created mailboxes.

I would like to know how best to run a script like the example I gave so that it runs regularly, at least once or twice a day.  Thanks.
Once you create the script you can use task scheduler on exchange server to run it daily. Here is an example of scheduling exchange scripts.

https://blog.ahasayen.com/schedule-powershell-exchange-script/

https://social.technet.microsoft.com/wiki/contents/articles/23150.how-to-use-task-scheduler-for-exchange-scripts.aspx


These look like examples for scheduling scripts against on-prem Exchange, we are running hybrid, but our user mailboxes are in Exchange Online
Since you are in hybrid and mailboxes will be created in exchange online you can follow below article for scheduling in O365 using O365 powershell.

https://social.technet.microsoft.com/wiki/contents/articles/32656.office-365-how-to-schedule-a-script-using-task-scheduler.aspx
ASKER CERTIFIED SOLUTION
Avatar of carbonbase
carbonbase
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial