powershell forcing ssl version 3 for get requests
powershell
Solution
Enumerations require the extended type square bracket syntax:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::ssl3
You could also just let PowerShell cast it for you:
[Net.ServicePointManager]::SecurityProtocol = 'ssl3'
Problem
I am wondering if one of the powershell, C# gurus can please shed some light on the how to force Sslv3 during a webrequest on Windows using [System.Net.WebRequest] I would like to convert the following C# code to Powershell's equivalent: ``` ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; ``` I tried adding the following code to my script but get and error that the term "Net.SecurityProtocolType.ssl3" is not recognized as the name of a cmdlet, scriptfile, function. Below is what I used in my code: ``` [System.Net.ServicePointManager]::SecurityProtocol = Net.SecurityProtocolType.ssl3 ``` Thanks for all the help!