Invoke-WebRequest -SslProtocol tls13 -Uri https://www.google.com

Connect with TLS 1.3 without error
Error message:
Invoke-WebRequest: Cannot bind parameter 'SslProtocol'. Cannot convert value "tls13" to type "Microsoft.PowerShell.Commands.WebSslProtocol". Error: "Unable to match the identifier name tls13 to a valid enumerator name. Specify one of the following enumerator names and try again:
Default, Tls, Tls11, Tls12"
Name Value
---- -----
PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
There is a comment saying that TLS 1.3 is not supported by HTTPClientHandler. Do we know if that has changed?
// Also SslProtocols.Default is not the "default" for HttpClientHandler as SslProtocols.Ssl3 is not supported.
IIRC SSL3 is not the same thing as TLS1.3; SSL3 is a much older protocol, if my memory of last time I stumbled around something like this is accurate.
EDIT: Yep, looks like SSL3 was the predecessor to TLS 1.0;
https://wiki.openssl.org/index.php/SSL_and_TLS_Protocols
SSL stands for Secure Sockets Layer and was originally created by Netscape. SSLv2 and SSLv3 are the 2 versions of this protocol (SSLv1 was never publicly released). After SSLv3, SSL was renamed to TLS.
TLS stands for Transport Layer Security and started with TLSv1.0 which is an upgraded version of SSLv3.
@vexx32 you're right, not sure why I read TLS 1.3 when it was SSL13.
Fix ready.
:tada:This issue was addressed in #13409, which has now been successfully released as v7.1.0-preview.7.:tada:
Handy links:
Most helpful comment
Looks like code was not updated for Tls13