1313 . NOTES
1414 Original Author: Mike Kallhoff
1515 Author: Blake Drumm (blakedrumm@microsoft.com)
16- Modified: November 8th, 2023
16+ Website: https://blakedrumm.com/
17+ Modified: April 18th, 2024
1718 Hosted here: https://github.com/blakedrumm/SCOM-Scripts-and-SQL/blob/master/Powershell/Get-TLSRegistryKeys.ps1
1819#>
1920[CmdletBinding ()]
@@ -84,7 +85,7 @@ Function Get-TLSRegistryKeys
8485 }
8586 }
8687 $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 "
8889 $ProtocolSubKeyList = " Client" , " Server"
8990 $DisabledByDefault = " DisabledByDefault"
9091 $Enabled = " Enabled"
@@ -103,8 +104,8 @@ Function Get-TLSRegistryKeys
103104 $localresults = @ ()
104105 if (! (Test-Path $currentRegPath ))
105106 {
106- $IsDisabledByDefault = " Null "
107- $IsEnabled = " Null "
107+ $IsDisabledByDefault = " DoesntExist "
108+ $IsEnabled = " DoesntExist "
108109 }
109110 else
110111 {
@@ -129,38 +130,42 @@ Function Get-TLSRegistryKeys
129130 }
130131 $localresults = " PipeLineKickStart" | Select-Object @ { n = ' Protocol' ; e = { $Protocol } },
131132 @ { 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+ }
164169 $finalData += $localresults
165170 }
166171 }
@@ -265,8 +270,8 @@ Function Get-TLSRegistryKeys
265270 $localresults = @ ()
266271 if (! (Test-Path $currentRegPath ))
267272 {
268- $IsDisabledByDefault = " Null "
269- $IsEnabled = " Null "
273+ $IsDisabledByDefault = " Not Present "
274+ $IsEnabled = " Not Present "
270275 }
271276 else
272277 {
0 commit comments