Powershell – Send Multiple Email Attachments using Send-MailMessage
Pass each attachment location to a variable and add this to the Attachments parameter separated by comma
Example
$Att1="c:\test1.csv" $Att2="c:\test1.csv" Send-MailMessage -To abc@tkr.com - From xyz@tkr.com -Subject "Attachments" -Attachments $Att1,$Att2
It would be super helpful if the example was visible. I get as far as “…”Attachments” -Attac” then it’s cut off and I can’t see the full example.
Dear Dalebert,
Please find below full example
$Att1=”c:\test1.csv”
$Att2=”c:\test1.csv”
Send-MailMessage -To abc@tkr.com – From xyz@tkr.com -Subject “Attachments” -Attachments $Att1,$Att2