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

JavaScript: Random Quote Generator

Demo Link: https://blog.kimconnect.com/wp-content/projects/randomQuoteGenerator.html HTML code: <body> <div class="container fluid"> <div> <div class="text-center"> <h1> Random Quote…

PowerShell: List All Hyper-V Snapshots of All VMs in All Clusters in Domain

# listHyperVSnapshots.ps1 $clusterName='*' function listAllHyperVSnapshots([string[]]$clusterName){ function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu' $rsatWindows81='https://download.microsoft.com/download/1/8/E/18EA4843-C596-4542-9236-DE46F780806E/Windows8.1-KB2693643-x64.msu' $rsat1709…

Linux: Using Bash to Search for Files Matching Certain Extensions

# using tree: list any files in a directory parentDirectory=/home tree --prune $parentDirectory # using…