Send-MailMessage may be one of my favorite Powershell cmdlets these days. As I’m sure you’ve guessed, it’s used for sending email- plain and simple.
While this can’t be said for all cmdlets, the syntax is very intuitive and straightforward.
Here’s an example:
Send-mailmessage -to recipient@abc.com -from me@xyz.com -subject "test" -smtpserver mailserver1.domain.com
You’ll find a bunch of other optional parameters here.
I’ve made use of this cmdlet in testing email relay configurations and even in new user provisioning scripts in Office365.
Anyone doing any level of Windows system administration should have this one in their toolkit.