Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell Script to Send Backup Notification through Office 365 SMTP

$
0
0

Afternoon all

After trying to setup a backup notification task schedule on Server 2012 i have come to realise that the Email option is no longer vaild, after reading around i have found that everyone now uses the "action" trigger to run a powershell script, i have never done any work with powershell but after reading around i have come up with the below

Send-MailMessage -to emailaddress@address.com -Subject "Backup Success" -body "The Windows Server Backup for Company has compleated successfully" -smtpserver smtp.office365.com -Credential $MyCredentials -UseSsl -port "587" -from emailaddress@address.com

When i run this script i cant get it to connect, i either get "Client was not authenticated to send anoymous email during MAIL FROM" or with the -UseSsl i get "unable to read data from the transport connection: net_io_connectionclosed"

Life...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>