Powershell - TLS1.2 support

一世执手 提交于 2019-12-08 15:34:41

问题


Do you know if there is a way to enable TLS1.2 in powershell (ie. for invoke-webrequest or invoke-restmethod)?

By default it looks like Powershell uses TLS1.0, which is not compatible with all our web services.

/Patrik


回答1:


There was!

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

/Patrik



来源:https://stackoverflow.com/questions/33594137/powershell-tls1-2-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!