@@ -706,8 +706,6 @@ function Test-SSL {
706
706
if ($SSLStream.IsAuthenticated ) {
707
707
$SSLTest = $true
708
708
$CertInfo = New-Object - TypeName Security.Cryptography.X509Certificates.X509Certificate2($SSLStream.RemoteCertificate )
709
- # CLEANUP
710
- # $Test = New-Object -TypeName System.Net.Security.SslStreamCertificateContext.create($CertInfo)
711
709
if ($CertInfo.Thumbprint -and $CheckCertRevocation ) {
712
710
Write-Log - Message " Grabbing CRL for $SSLTarget and verify against known-good" - Component ' TestSSL'
713
711
$CRLURIarray = $CertInfo.Extensions | Where-Object - FilterScript { $_.Oid.Value -eq ' 2.5.29.31' } | ForEach-Object - Process { $_.Oid.FriendlyName ; $_.Format ($true ) }
@@ -724,17 +722,17 @@ function Test-SSL {
724
722
Write-Log " SSL Inspection very likely. $SSLTarget is not a known CRL address" - Component ' TestSSL' - Type 2
725
723
$SSLInspectionResult = $true
726
724
}
727
- } elseif ($CRLURIarray [1 ].split(' [' ).count -eq 2 ) {
728
- $CRLURI = $CRLURIarray [1 ].Split(' http://' )[1 ].split(' /' )[0 ]
729
- $KnownCRL = Test-SSLInspectionByKnownCRLs - CRLURL $CRLURI
730
- if (-not ($KnownCRL )) {
731
- Write-Log " Unknown CRL. $SSLTarget 's certificate didn't provide any known CRL address" - Component ' TestSSL' - Type 2
725
+ } elseif ($CRLURIarray [1 ].split(' [' ).count -ge 2 ) {
726
+ if ($CRLURIarray [1 ].split(' [' ).count -eq 2 ) {
727
+ $CRLURI = $CRLURIarray [1 ].Split(' http://' )[1 ].split(' /' )[0 ]
728
+ $KnownCRL = Test-SSLInspectionByKnownCRLs - CRLURL $CRLURI
729
+ } elseif ($CRLURIarray [1 ].split(' [' ).count -gt 2 ) {
730
+ $TestMultipleCRLs = $CRLURIarray [1 ].split(' =' ).split(' [' ).trim() | Where-Object { $_.startswith (" http://" ) } | ForEach-Object { Test-SSLInspectionByKnownCRLs - CRLURL $_.Split (' http://' )[1 ].split(' /' )[0 ] } | Where-Object { $_ -contains $true }
731
+ if ($TestMultipleCRLs ) { $KnownCRL = $true }
732
732
}
733
- } elseif ($CRLURIarray [1 ].split(' [' ).count -gt 2 ) {
734
- $TestMultipleCRLs = $CRLURIarray [1 ].split(' =' ).split(' [' ).trim() | Where-Object { $_.startswith (" http://" ) } | ForEach-Object { Test-SSLInspectionByKnownCRLs - CRLURL $_.Split (' http://' )[1 ].split(' /' )[0 ] } | Where-Object { $_ -contains $true }
735
- if ($TestMultipleCRLs ) { $KnownCRL = $true }
736
733
if (-not ($KnownCRL )) {
737
- Write-Log " Unknown CRLs. $SSLTarget 's certificate didn't provide any known CRL addresses" - Component ' TestSSL' - Type 2
734
+ Write-Log " Unknown CRL. $SSLTarget 's certificate didn't provide any known CRL address" - Component ' TestSSL' - Type 2
735
+ $SSLInspectionResult = $true
738
736
}
739
737
}
740
738
}
@@ -1741,19 +1739,19 @@ function Test-Intune {
1741
1739
Test-Network $IntTarget
1742
1740
}
1743
1741
$resultlist = @ {
1744
- TestWindowsActivation = Test-Autopilot
1745
- EntraIDTest = Test-RemoteHelp
1746
- WNSTest = Test-WNS
1747
- DOTest = Test-DeliveryOptimization
1748
- AppleTest = Test-Apple
1749
- AndroidTest = Test-Android
1750
- StoreTest = Test-MicrosoftStore
1751
- DeviceHealth = Test-DeviceHealth
1752
- WUTest = Test-WindowsUpdate
1753
- EndpAnalytics = Test-EndpointAnalytics
1742
+ TestAutoPilot = Test-Autopilot
1743
+ EntraIDTest = Test-RemoteHelp
1744
+ WNSTest = Test-WNS
1745
+ DOTest = Test-DeliveryOptimization
1746
+ AppleTest = Test-Apple
1747
+ AndroidTest = Test-Android
1748
+ StoreTest = Test-MicrosoftStore
1749
+ DeviceHealth = Test-DeviceHealth
1750
+ WUTest = Test-WindowsUpdate
1751
+ EndpAnalytics = Test-EndpointAnalytics
1754
1752
# MDE = Test-MDE #Not done!
1755
- DiagnosticsDataTest = Test-DiagnosticsData
1756
- NTPTest = Test-NTP
1753
+ DiagnosticsDataTest = Test-DiagnosticsData
1754
+ NTPTest = Test-NTP
1757
1755
}
1758
1756
if ($resultlist.values -contains $false ) {
1759
1757
Write-Log - Message " $resultlist " - Component " Test$ServiceArea " - Type 3
@@ -1817,7 +1815,6 @@ function Merge-ResultFiles {
1817
1815
Write-Log " File $ ( $CSVPath ) not found" - Component ' MergeResultFiles' - Type 3
1818
1816
return $false
1819
1817
}
1820
- # $culture = [cultureinfo]::InvariantCulture
1821
1818
$culture = [Globalization.CultureInfo ]::CreateSpecificCulture(' de-DE' )
1822
1819
$TimeStamp = Get-Date ([DateTime ]::ParseExact(" $ ( $CSVPath.name.Replace (' ResultList_' , ' ' ).substring(0 , 15 )) " , ' yyyyMMdd_HHmmss' , $culture )) - Format " dd.MM.yyyy HH:mm:ss"
1823
1820
$CSVComputername = $ ($CSVPath.name.Split (' _' )[3 ].split(' .' )[0 ])
0 commit comments