$AWS_ACCESS_KEY = "RealAccessKeyRightHere" $AWS_SECRET_KEY = "TotallyRealSecretKeyRightHere" $SECURE_KEY = $(ConvertTo-SecureString -AsPlainText -String $AWS_SECRET_KEY -Force) $creds = $(New-Object System.Management.Automation.PSCredential ($AWS_ACCESS_KEY, $SECURE_KEY)) $from = "no-reply@emailrulz.com" $to = "victim1@roadkill.com" $subject = "Test SES Message" $body = "Just testing that my AWS SES parameters are correct" Write-Host "Sending Email via AmazonSES" Send-MailMessage -From $from -To $to -Subject $subject -Body $body -SmtpServer email-smtp.us-east-1.amazonaws.com -Credential $creds -UseSsl -Port 587 Write-Host "Sent"