@@ -63,13 +63,11 @@ Add-Type -Debug:$False @"
63
63
}
64
64
"@
65
65
[System.Net.ServicePointManager ]::CertificatePolicy = New-Object TrustAllCertsPolicy
66
- # Enable TLS 1.2
67
- if ([Net.ServicePointManager ]::SecurityProtocol.ToString().Split(' ,' ).Trim() -notcontains ' Tls12' ) {
68
- $securityProtocol = @ ()
69
- $securityProtocol += [Net.ServicePointManager ]::SecurityProtocol
70
- $securityProtocol += [Net.SecurityProtocolType ]3072
71
- [Net.ServicePointManager ]::SecurityProtocol= $securityProtocol
72
- }
66
+ # Enable TLS, TLS1.1, TLS1.2 in this session if they are available
67
+ IF ([Net.SecurityProtocolType ]::Tls) {[Net.ServicePointManager ]::SecurityProtocol= [Net.ServicePointManager ]::SecurityProtocol -bor [Net.SecurityProtocolType ]::Tls}
68
+ IF ([Net.SecurityProtocolType ]::Tls11) {[Net.ServicePointManager ]::SecurityProtocol= [Net.ServicePointManager ]::SecurityProtocol -bor [Net.SecurityProtocolType ]::Tls11}
69
+ IF ([Net.SecurityProtocolType ]::Tls12) {[Net.ServicePointManager ]::SecurityProtocol= [Net.ServicePointManager ]::SecurityProtocol -bor [Net.SecurityProtocolType ]::Tls12}
70
+
73
71
# region [Functions]-------------------------------------------------------------
74
72
75
73
Function Get-LTServiceInfo {
@@ -433,7 +431,7 @@ Function Start-LTService{
433
431
Write-Warning " There was an issue killing the following process: $proc "
434
432
Write-Warning " This generally means that a 'protected application' is using this port."
435
433
$newPort = [int ]$port + 1
436
- if ($newPort > 42009 ) {$newPort = 42000 }
434
+ if ($newPort -gt 42009 ) {$newPort = 42000 }
437
435
Write-Warning " Setting tray port to $newPort ."
438
436
New-ItemProperty - Path " HKLM:\Software\Labtech\Service" - Name TrayPort - PropertyType String - Value $newPort - Force - WhatIf:$False - Confirm:$False | Out-Null
439
437
}# End Catch
0 commit comments