Posts

Showing posts from July, 2018

When TLS 1.2 breaks Invoke-Webrequest

Image
Update[7/16/18]: Marc R Kellerman kindly shared his approach on twitter with me today: [Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType].GetEnumValues() It works as we can pass an array of values to the Net.ServicePointManager.  I think this is nicely done! Thank you so much Marc!  Head over to  Marc's twitter and blog  for more good information! With more websites moving to TLS 1.2 only, I find using Invoke-WebRequest from Windows PowerShell becomes less reliable because Windows PowerShell's defaults to using Ssl3 and TLS1.0. In this post I am going to share how I worked around the challenge in Windows PowerShell. Very importantly, if you can use PowerShell Core 6 for Invoke-WebRequest, do it. The cmdlet is much improved in PowerShell Core 6 thanks to Mark Karus . So over the past weekend, I was learning about English and was experimenting to parse the Princeton university's WordNet site  with PowerShell. However, I got this bleedin