Check PowerShell Security Protocol Type

To check whic

List the Security Protocol configuration

[Net.ServicePointManager]::SecurityProtocol

Get the BaseType of Net.SecurityProtocolType

[Net.SecurityProtocolType]

# Get the PowerShell supported TLS versions

[enum]::GetNames([Net.SecurityProtocolType])

# Force PowerShell to use TLS 1.2

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

Force PowerShell to use TLS 1.2

By default, PowerShell uses TLS 1.0. Because SEP (Symantec Endpoint Protection) uses TLS 1.2, you will receive a connection error message if you do not change this behaviour. To force PowerShell to use TLS 1.2, add the following line to your script:

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

Leave a comment

About the author

Sophia Bennett is an art historian and freelance writer with a passion for exploring the intersections between nature, symbolism, and artistic expression. With a background in Renaissance and modern art, Sophia enjoys uncovering the hidden meanings behind iconic works and sharing her insights with art lovers of all levels. When she’s not visiting museums or researching the latest trends in contemporary art, you can find her hiking in the countryside, always chasing the next rainbow.