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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s