Using Send-MailMessage option in Exchange Management Shell, we can easily send the file as attachment to our email address and below the shell command to send emails
$file = "C:\ScriptOutput.csv"
Send-MailMessage -Attachments $file -To rajkumar.mcitp@outlook.com -From Admin@DomainName.Com -Subject Test -SmtpServer yourexchangeservername.domainname.com
I normally use these shell command to send the Message Tracking Logs csv file as emails to my mailbox.
No comments:
Post a Comment