-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Hi,
is there a way to send messages to multiple Teams channels? Maybe switch between channels?
I tried to set the WebHook on demand, sending a message to a different channel, setting the WebHook back to original.
$secondchannel = "WEBHOOK URL"
$defaultchannel = (Get-LoggingTarget -Name Teams).WebHook
(Get-LoggingTarget -Name Teams).WebHook = $secondchannel
Write-Log -Message ....
(Get-LoggingTarget -Name Teams).WebHook = $defaultchannelBut since the logger is running in background, the messages are not send in time to the designated channel.
So sometimes the WebHook value is set back to $defaultchannel, before the logger sends the message to Teams.
Also calling the Wait-Logging function before resetting the WebHook, is not working out reliably.
Maybe there is a proper way to work with different WebHook URLs.
Cheers!
Metadata
Metadata
Assignees
Labels
No labels