@@ -39,6 +39,15 @@ if($icon -ne "No icon given") {
Write-Output"payload:"
Write-Output"$payload"
# 2020-05-23: As of 2020-05-04, Slack is blocking TLS connections using TLS v1.1 or lower.
# This was causing Invoke-WebRequest to error out with a 404 / WebCmdletWebResponseException error.
# This may only affect systems with certain version of .NET (which is what Invoke-WebRequest relies on under the hood), due to it affecting the system's default TLS version.
# But the line below should force TLS v1.2 to be preferred.
# A better solution would be to change the system default TLS version to something higher than v1.1.