Sending an Email Via Powershell (v2.0) or Higher

This one is so easy it’s almost not worth mentioning, however I’m sure at some point I’ll forget it, and want to reference it so… Here’s the tip of the day! To send an email in Powershell (v2.0 or higher) Microsoft has made it really easy on us. There is a cmdlet, here it is with some syntax for you too.

Send-mailmessage -from “” -to “” -subject “This is the subject of my email” -body “This email has a nice body.” -smtpserver “”

And that’s it, easy peasy! As long as your smtp server is setup to allow anonymous connections, you’re all set!




Leave a Reply

Your email address will not be published. Required fields are marked *