Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions CertificationAuthority/Validate-NDESConfiguration.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


<#

.SYNOPSIS
Expand Down Expand Up @@ -1346,16 +1346,16 @@ Log-ScriptEvent $LogFilePath "LastBootTime:$LastBoot" NDES_Validation 1

#################################################################

#region Checking Intune Connector is installed
#region Checking Certificate Connector for Microsoft Intune is installed

Write-host
Write-host "......................................................."
Write-host
Write-Host "Checking Intune Connector is installed..." -ForegroundColor Yellow
Write-Host "Checking Certificate Connector for Microsoft Intune is installed..." -ForegroundColor Yellow
Write-host
Log-ScriptEvent $LogFilePath "Checking Intune Connector is installed" NDES_Validation 1
Log-ScriptEvent $LogFilePath "Checking Certificate Connector for Microsoft Intune is installed" NDES_Validation 1

if ($IntuneConnector = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | ? {$_.DisplayName -eq "Microsoft Intune Connector"}){
if ($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
Expand All @@ -1369,7 +1369,7 @@ Log-ScriptEvent $LogFilePath "Checking Intune Connector is installed" NDES_Valid

else {

Write-Host "Error: Intune Connector not installed" -BackgroundColor red
Write-Host "Error: Certificate Connector for Microsoft Intune not installed" -BackgroundColor red
Write-Host 'Please review "Step 5 - Enable, install, and configure the Intune certificate connector".'
write-host "URL: https://docs.microsoft.com/en-us/intune/certificates-scep-configure#configure-your-infrastructure"
Write-Host
Expand All @@ -1382,14 +1382,14 @@ Log-ScriptEvent $LogFilePath "Checking Intune Connector is installed" NDES_Valid

#################################################################

#region Checking Intune Connector registry keys (KeyRecoveryAgentCertificate, PfxSigningCertificate and SigningCertificate)
#region Checking Certificate Connector for Microsoft Intune registry keys (KeyRecoveryAgentCertificate, PfxSigningCertificate and SigningCertificate)

Write-host
Write-host "......................................................."
Write-host
Write-Host "Checking Intune Connector registry keys are intact" -ForegroundColor Yellow
Write-Host "Checking Certificate Connector for Microsoft Intune registry keys are intact" -ForegroundColor Yellow
Write-host
Log-ScriptEvent $LogFilePath "Checking Intune Connector registry keys are intact" NDES_Validation 1
Log-ScriptEvent $LogFilePath "Checking Certificate Connector for Microsoft Intune registry keys are intact" NDES_Validation 1
$ErrorActionPreference = "SilentlyContinue"

$KeyRecoveryAgentCertificate = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MicrosoftIntune\NDESConnector\KeyRecoveryAgentCertificate"
Expand Down