From f0561e93644fc410b1d661503c4abb4450038964 Mon Sep 17 00:00:00 2001 From: Peter Egerton <30479892+peteregerton@users.noreply.github.com> Date: Tue, 4 Oct 2022 15:56:10 +0100 Subject: [PATCH] Added statement to catch newer certificate connector Added an elseif to include the detection for the updated Certificate connector for Microsoft Intune and added a warning when the older Microsoft Intune Connector is detected. --- .../Validate-NDESConfiguration.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CertificationAuthority/Validate-NDESConfiguration.ps1 b/CertificationAuthority/Validate-NDESConfiguration.ps1 index 73ac914..0005ab1 100644 --- a/CertificationAuthority/Validate-NDESConfiguration.ps1 +++ b/CertificationAuthority/Validate-NDESConfiguration.ps1 @@ -1,4 +1,4 @@ - + <# .SYNOPSIS @@ -1358,6 +1358,20 @@ Log-ScriptEvent $LogFilePath "Checking Intune Connector is installed" NDES_Valid if ($IntuneConnector = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | ? {$_.DisplayName -eq "Microsoft Intune Connector"}){ Write-Host "Success: " -ForegroundColor Green -NoNewline + Write-Host "$($IntuneConnector.DisplayName) was installed on " -NoNewline + Write-Host "$($IntuneConnector.InstallDate) " -ForegroundColor Cyan -NoNewline + write-host "and is version " -NoNewline + Write-Host "$($IntuneConnector.DisplayVersion)" -ForegroundColor Cyan + write-warning "This version of the Intune certificate connector has been replaced by the Certificate Connector for Microsoft Intune" + write-warning "URL: https://learn.microsoft.com/en-us/mem/intune/protect/certificate-connector-overview" + Write-host + Log-ScriptEvent $LogFilePath "ConnectorVersion:$IntuneConnector" NDES_Validation 1 + + } + + elseif ($IntuneConnector = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | ? {$_.DisplayName -eq "Certificate Connector for Microsoft Intune"}){ + + Write-Host "Success: " -ForegroundColor Green -NoNewline Write-Host "$($IntuneConnector.DisplayName) was installed on " -NoNewline Write-Host "$($IntuneConnector.InstallDate) " -ForegroundColor Cyan -NoNewline write-host "and is version " -NoNewline