0
我从cmd .bat脚本运行此PowerShell命令。它似乎在抱怨'要求'作为一个论点。命令中的唯一'请求'在引号内。这是怎么回事?Powershell发送邮件失败
M:>powershell send-mailmessage -to "[email protected]" -from "[email protected]" -subject "Standard Extract Request" -SmtpServer "mail.company.com" -attachment "file.txt"
Send-MailMessage : A positional parameter cannot be found that accepts argument 'Request'.
At line:1 char:1
+ send-mailmessage -to [email protected] -from [email protected] -subject Stan ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Send-MailMessage], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SendMailMessage
你是从CMD运行的吗? – Kiran