This article contains some example PowerShell scripts that can be used during Stage 2 workflow processing
Send an email to a user when their migration is complete:

Add the following script:

Param($smtp,$emailSendAccount,$userName,$userEmail) $subject = "Notification: $userName - Migration of your data COMPLETED!" $body = "Dear <b><font color=green>$userName</b></font>, <br>" $body += "<p>migration of your <b>mailbox</b> successfully finished.<br>" $body
 += "<p><p> <i><font size=2>This message has
been automatically generated by QUADROtech Archive Shuttle system, click
 to check QUADROtech's website.</font></i><br>" Send-MailMessage –From $emailSendAccount –To $userEmail –Subject $subject –Body $body -BodyAsHtml -SmtpServer $smtp -Port 25

Add the following parameters

– any valid SMTP server inside the organization
– an email address that the service account running the PowerShell Execution module has access to
– Token: {UserFirstName}
– Token: {PrimarySMTPAddress}

It is advised to test the Send-MailMessage command line via PowerShell to refine the parameters that might be required by your SMTP server and to ensure that the message looks good in an email client.

Finally, the script execution has to be added to your chosen workflow.

The tokens/variables which can be used are described here.

Print Friendly, PDF & Email