13
13
. NOTES
14
14
Original Author: Mike Kallhoff
15
15
Author: Blake Drumm ([email protected] )
16
- Modified: November 8th, 2023
16
+ Website: https://blakedrumm.com/
17
+ Modified: April 18th, 2024
17
18
Hosted here: https://github.com/blakedrumm/SCOM-Scripts-and-SQL/blob/master/Powershell/Get-TLSRegistryKeys.ps1
18
19
#>
19
20
[CmdletBinding ()]
@@ -84,7 +85,7 @@ Function Get-TLSRegistryKeys
84
85
}
85
86
}
86
87
$finalData = @ ()
87
- $ProtocolList = " TLS 1.0" , " TLS 1.1" , " TLS 1.2"
88
+ $ProtocolList = " TLS 1.0" , " TLS 1.1" , " TLS 1.2" , " TLS 1.3 "
88
89
$ProtocolSubKeyList = " Client" , " Server"
89
90
$DisabledByDefault = " DisabledByDefault"
90
91
$Enabled = " Enabled"
@@ -103,8 +104,8 @@ Function Get-TLSRegistryKeys
103
104
$localresults = @ ()
104
105
if (! (Test-Path $currentRegPath ))
105
106
{
106
- $IsDisabledByDefault = " Null "
107
- $IsEnabled = " Null "
107
+ $IsDisabledByDefault = " DoesntExist "
108
+ $IsEnabled = " DoesntExist "
108
109
}
109
110
else
110
111
{
@@ -129,38 +130,42 @@ Function Get-TLSRegistryKeys
129
130
}
130
131
$localresults = " PipeLineKickStart" | Select-Object @ { n = ' Protocol' ; e = { $Protocol } },
131
132
@ { n = ' Type' ; e = { $key } },
132
- @ { n = ' DisabledByDefault' ; e = {
133
- $output = ($IsDisabledByDefault ).ToString()
134
- if ($output -eq ' 0' )
135
- {
136
- $output.Replace (' 0' , ' False' ).Replace(' 1' , ' True' )
137
- }
138
- elseif ($output -eq ' $0xffffffff' )
139
- {
140
- " $output (True)"
141
- }
142
- else
143
- {
144
- $output
145
- }
146
-
147
- } },
148
- @ { n = ' IsEnabled' ; e = {
149
- $output = ($IsEnabled ).ToString()
150
- if ($output -eq ' 0' )
151
- {
152
- $output.Replace (' 0' , ' False' ).Replace(' 1' , ' True' )
153
- }
154
- elseif ($output -eq ' $0xffffffff' )
155
- {
156
- " $output (True)"
157
- }
158
- else
159
- {
160
- $output
161
- }
162
-
163
- } }
133
+ @ {
134
+ n = ' DisabledByDefault' ; e = {
135
+ $output = ($IsDisabledByDefault ).ToString()
136
+ if ($output -eq ' 0' )
137
+ {
138
+ $output.Replace (' 0' , ' False' ).Replace(' 1' , ' True' )
139
+ }
140
+ elseif ($output -eq ' $0xffffffff' )
141
+ {
142
+ " $output (True)"
143
+ }
144
+ else
145
+ {
146
+ $output
147
+ }
148
+
149
+ }
150
+ },
151
+ @ {
152
+ n = ' IsEnabled' ; e = {
153
+ $output = ($IsEnabled ).ToString()
154
+ if ($output -eq ' 0' )
155
+ {
156
+ $output.Replace (' 0' , ' False' ).Replace(' 1' , ' True' )
157
+ }
158
+ elseif ($output -eq ' $0xffffffff' )
159
+ {
160
+ " $output (True)"
161
+ }
162
+ else
163
+ {
164
+ $output
165
+ }
166
+
167
+ }
168
+ }
164
169
$finalData += $localresults
165
170
}
166
171
}
@@ -265,8 +270,8 @@ Function Get-TLSRegistryKeys
265
270
$localresults = @ ()
266
271
if (! (Test-Path $currentRegPath ))
267
272
{
268
- $IsDisabledByDefault = " Null "
269
- $IsEnabled = " Null "
273
+ $IsDisabledByDefault = " Not Present "
274
+ $IsEnabled = " Not Present "
270
275
}
271
276
else
272
277
{
0 commit comments