powershell - 需要使用 Powershell 向 Teams 发送 .csv
问题描述
我想使用 Powershell 将 .csv 文件发送到 Microsoft Teams 频道。我有传入的 webhook URI,但我不确定应该使用哪个命令来完成此操作。我已经尝试使用该SendTeamsMessage
命令,但无法通过。任何帮助表示赞赏。谢谢你。这个论坛摇滚..
解决方案
请使用以下脚本,它正在工作
Send-MailMessage -From "User1@contoso.com" -To "channelemailaddress" -Subject "Test123" -SmtpServer "smtp.office365.com" -Credential "User1@contoso.com" -UseSsl -Attachments "E:\scripts\output.csv"
有关更多信息,请参阅附件。https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7
推荐阅读
- azure - 如何通过 Azure Devops 部署 Azure Function (Java)?
- javascript - LinkedIn Javascript SDK API“呃哦”错误弹出窗口
- javascript - 创建 Chrome 扩展程序,它将突出显示网站上特定的预定义词。
- java - 通过多态性从主类调用 toString
- c - 如何更改“clang-format”选项以防止制动支架
- c# - 正则表达式匹配某些公式
- c - C strcpy() 在函数内部但不在 main() 上时中断
- r - 当两个数据框的行数不同时,如何从数据框 A 中删除与数据框 B 中的行匹配的行?
- sql - SQL 数据聚合 - 将行转换为列 - 包含数十亿行的表
- react-native - 反应原生蓝牙应用当前时间服务