Email file from Windows Server via Powershell

If you need to send an attachment from a Windows server to an email address use the following syntax

Open Powershell

Send-MailMessage -To "Myaddress@jordansphere.co.uk" -From "Logs@jordansphere.co.uk" -Subject "Logs" -SmtpServer "smtp.jordansphere.co.uk" -Attachments "Myfile.csv"