Hi,
I'm trying to run Send-MailMessage directly from a command window.
c:>powershell Send-MailMessage -from '[email protected]' -to "[email protected]" -subject 'test' -smtpServer "srv.server.com" -Attachment c:\Test\log.txt -body "Test message"
This fails with
Send-MailMessage : A positional parameter cannot be found that accepts argument 'from'.
I'm sure it's possible. I just dont know how to pass the arguments correctly.