Posted On November 2, 2021

Quick & Useful Snippet to Set SSL TLS Protocol of PowerShell

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Quick & Useful Snippet to Set SSL TLS Protocol of PowerShell
  $requiredTls='Tls12'
  $availableSslProtocols=[enum]::getnames([net.securityprotocoltype])
  if([Net.ServicePointManager]::SecurityProtocol -notin $requiredTls -and $requiredTls -in $availableSslProtocols){
      [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::$requiredTls
  }

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Reset Active Directory Server

Step 0: # Ensure that AD management module is available for PS Sessionif (!(get-module -name…

Basic JavaScript: Constructing Strings with Variables

// Examplevar ourName = "freeCodeCamp";var ourStr = "Hello, our name is " + ourName +…

PowerShell: Process Watcher – Restart Stopped Services

# processWatcher.ps1 # User Input $computername=$env:computername $serviceName='remoteregistry' $desiredStatus='Running' $action={ param($serviceName) $erroractionpreference='stop' try{ start-service $serviceName return…