You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$JSONBody="{`"text`": `"You've setup your alert policies to be alerted whenever specific events happen. We've found some of these events in the log. <br><br>$JSONContent`"}"
123
-
Invoke-RestMethod-Uri $webhook-Method POST -ContentType 'Application/json'-Body $JSONBody
122
+
$TeamsBody= [PSCustomObject]@{
123
+
text="You've setup your alert policies to be alerted whenever specific events happen. We've found some of these events in the log. <br><br>$ReplacedContent"
124
+
} |ConvertTo-Json-Compress
125
+
Invoke-RestMethod-Uri $webhook-Method POST -ContentType 'Application/json'-Body $TeamsBody
124
126
}
125
127
'*discord.com*' {
126
-
$JSONBody="{`"content`": `"You've setup your alert policies to be alerted whenever specific events happen. We've found some of these events in the log. $JSONContent`"}"
127
-
Invoke-RestMethod-Uri $webhook-Method POST -ContentType 'Application/json'-Body $JSONBody
128
+
$DiscordBody= [PSCustomObject]@{
129
+
content="You've setup your alert policies to be alerted whenever specific events happen. We've found some of these events in the log. ``````$ReplacedContent``````"
130
+
} |ConvertTo-Json-Compress
131
+
Invoke-RestMethod-Uri $webhook-Method POST -ContentType 'Application/json'-Body $DiscordBody
$JSONBody="{`"text`": `"You've setup your alert policies to be alerted whenever specific events happen. We've found some of these events in the log. $JSONContent`"}"
138
+
$SlackBody= [PSCustomObject]@{
139
+
text="You've setup your alert policies to be alerted whenever specific events happen. We've found some of these events in the log. ``````$ReplacedContent``````"
140
+
} |ConvertTo-Json-Compress
135
141
}
136
-
Invoke-RestMethod-Uri $webhook-Method POST -ContentType 'Application/json'-Body $JSONBody
142
+
Invoke-RestMethod-Uri $webhook-Method POST -ContentType 'Application/json'-Body $SlackBody
0 commit comments