且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将多个附件添加到 Powershell 电子邮件脚本

更新时间:2023-01-09 12:55:44

我没有测试过,你可以这样试试

I have not tested but you can try like this

#Converts to array
$Report = @("C:\somefolder\somefile.xml")
$AnotherReport = "C:\somefolder\someotherfile.xml"
$Report += $AnotherReport

Send-MailMessage -Attachments $Report