ryan-jan / MSCatalog

PowerShell module for searching and downloading offline updates from https://www.catalog.update.microsoft.com
MIT License
58 stars 16 forks source link

Set-TempSecurityProtocol and TLS 1.3 #11

Closed xxbiohazrdxx closed 2 years ago

xxbiohazrdxx commented 2 years ago

Getting an exception from Set-TempSecurityProtocol trying to enable TLS 1.3:

"Cannot convert value 'Tls13to type 'System.Net.SecurityProtocolType"

It looks like by default since .NET 4.7 the service point manager will use the system default (which generally will be TLS 1.2)

https://stackoverflow.com/questions/44751179/tls-1-2-not-negotiated-in-net-4-7-without-explicit-servicepointmanager-security

Honestly, I probably would just try and set TLS 1.2 for the time being or let the OS handle it. Commenting out Set-TempSecurityProtocol local fixed all issues for me and allowed me to search/download updates.