我想使用Powershell将.csv文件发送到Microsoft Teams频道。我有传入的Webhook URI,但是我不确定应该使用哪个命令来完成此操作。我尝试使用SendTeamsMessage
命令,但无法通过。任何帮助表示赞赏。谢谢。这个论坛动摇了..
请使用下面的脚本,它正在运行
Send-MailMessage-从“ [email protected]”-到“ channelemailaddress”-主题“ Test123” -SmtpServer“ smtp.office365.com”-凭据“ [email protected]” -UseSsl-附件“ E:\ scripts \ output.csv“
请参阅附件以获得更多信息。 https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7
请在上述脚本中保留频道电子邮件地址,而不是channelemailaddress,我已使用上述脚本将.csv文件发送到团队中的频道。