当我尝试向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