-
Notifications
You must be signed in to change notification settings - Fork 50
Teams
Massimo Bonvicini edited this page Aug 27, 2019
·
3 revisions
From version 4.3
> Add-LoggingTarget -Name Teams -Configuration @{
WebHook = <NOTSET> # <Required> Sets the Teams Connector URI (eg. 'https://outlook.office.com/webhook/...')
Details = $true # <Not required> Prints Log message details like PID, caller etc.
Level = <NOTSET> # <Not required> Sets the logging format for this target
Colors = @{ # <Not required> Maps log levels to badge colors
'DEBUG' = 'blue'
'INFO' = 'brightgreen'
'WARNING' = 'orange'
'ERROR' = 'red'
}
}
Write-Log -Level 'WARNING' -Message 'Hello, Powershell!'
Write-Log -Level 'WARNING' -Message 'Hello, {0}!' -Arguments 'Powershell'
Write-Log -Level 'WARNING' -Message 'Hello, {0}!' -Arguments 'Powershell' -Body @{source = 'Logging'}