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 = $defaultchannel
But 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!
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.
But 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-Loggingfunction before resetting the WebHook, is not working out reliably.Maybe there is a proper way to work with different WebHook URLs.
Cheers!