Invoke-RestMethod:通用传入Webhook接收到无效的有效负载

时间:2020-04-17 14:18:58

标签: powershell tsql microsoft-teams

当我尝试向webhook团队发出发布请求时,出现以下错误消息:

Invoke-RestMethod:通用传入的Webhook接收到错误的有效载荷。

下面是代码:

DECLARE @cmd VARCHAR(1000)
SET @cmd='Powershell.exe Invoke-RestMethod -Method post -ContentType ''Application/Json'' -Body ''{"text":"Hello"}'' -Uri <<webhook connector>>'
EXEC master..xp_cmdshell @cmd

0 个答案:

没有答案