From fdb4743a0e94c2aebd64f08de0af9c2a306d94b0 Mon Sep 17 00:00:00 2001 From: Kevin Crouch Date: Mon, 22 Jul 2019 15:52:49 -0400 Subject: [PATCH] Set Default TLS level for the Powershell Session MX Toolbox doesn't seem to be allowing connections to the API for anything lower than TLS1.2 by default, this sets the default --- MxLookup Module/MxLookup.psm1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MxLookup Module/MxLookup.psm1 b/MxLookup Module/MxLookup.psm1 index 7d71efd..6190e23 100644 --- a/MxLookup Module/MxLookup.psm1 +++ b/MxLookup Module/MxLookup.psm1 @@ -25,6 +25,9 @@ Function Connect-MXOnline (){ $URL = "https://api.mxtoolbox.com/api/v1/usage/" Write-Verbose $URL + + Write-Verbose "Enabling TLS1.2 by default for this session" + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; } process