From 11d49dc24593a7dfa1e64abcd4e5eeaf3ea16971 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Thu, 1 Oct 2026 10:30:18 -0600 Subject: [PATCH] Fix CED ConfigMgr notification connectivity and verify online status --- docs/ced-network-operations.md | 28 +++++++++++++++++++ scripts/Set-SguCedNotificationFirewall.ps1 | 31 ++++++++++++++++++++++ scripts/Test-SguCedManagedNodes.ps1 | 24 ++++++++++++++--- 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 scripts/Set-SguCedNotificationFirewall.ps1 diff --git a/docs/ced-network-operations.md b/docs/ced-network-operations.md index 44b7d67..3880c4b 100644 --- a/docs/ced-network-operations.md +++ b/docs/ced-network-operations.md @@ -127,6 +127,7 @@ during source download can fail the installation and require a retry. .\scripts\Set-SguCedDnsPolicy.ps1 .\scripts\Set-SguCedWacCertificate.ps1 .\scripts\Set-SguCedConfigMgrCollection.ps1 +.\scripts\Set-SguCedNotificationFirewall.ps1 $credential = Get-Credential .\scripts\Invoke-SguCedPreparation.ps1 -InventoryPath -Credential $credential -MigrateWifi @@ -168,9 +169,34 @@ keys, private certificates, or original clear-key WLAN exports are committed. `Test-SguCedManagedNodes.ps1` checks live SSID, the successful profile event, reachable WinRM, CcmExec, assigned site, and WAC root trust. Also verify the WAC OS endpoint, ConfigMgr server-side client registration, and collection membership. +The validation script also reads `CNIsOnline` from the local site provider and +returns it as `NotificationOnline`. A null value means provider data is unavailable; +it must not be interpreted as an offline client. An installation wizard success screen or a scheduled installation request does not establish that installation completed. +### Configuration Manager gray X icons + +The green check and gray X indicate the client notification connection. They are +separate from `Client=Yes`, recent client activity, and client health. On October 1, +AF-02 through AF-06 and AF-10 remained reachable with CcmExec running, but their +notification logs repeatedly reported `Failed to find a access point ... 8000000a`. +Restarting CcmExec restored management-point discovery. The server was listening +on TCP 10123, but connections timed out until the missing inbound firewall rule +was added. `Set-SguCedNotificationFirewall.ps1` reproduces that rule for only +SGU-DC02's CED address, the Domain firewall profile, the notification host process, +and source subnet `192.168.54.0/24`. + +After correcting the port, restart CcmExec only on affected clients when needed, +then check their notification keep-alive logs and server-side `CNIsOnline`. +Allow time for status reports and refresh the console. Do not reinstall the +client solely because its notification icon is gray. + +The follow-up validation reported all 39 CED devices reachable and +`NotificationOnline=True`, including all six affected AF clients. The server log +confirmed 39 online notification sessions (6 TCP and 33 HTTP). No operating-system +restart or client reinstallation was needed. + To recover the previous Wi-Fi, first provision an existing known-good profile and reconnection task on SGU-DC02 and affected PCs. Then restore Aula Flexible on VLAN 53, or re-enable the preserved Sala de Desarrollo network, as appropriate. @@ -190,3 +216,5 @@ is not changed by this network repair. - [Computer startup script protocol](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpscr/ff1fd13e-1e18-4160-9b50-0263e108e5e1) - [Configuration Manager client source selection](https://learn.microsoft.com/en-us/intune/configmgr/core/servers/deploy/configure/boundary-groups-distribution-points) - [Domain DNS policy cmdlet](https://learn.microsoft.com/en-us/powershell/module/dnsclient/add-dnsclientnrptrule) +- [Configuration Manager client monitoring](https://learn.microsoft.com/en-us/intune/configmgr/core/clients/manage/monitor-clients) +- [Configuration Manager connection ports](https://learn.microsoft.com/en-us/intune/configmgr/core/plan-design/hierarchy/ports) diff --git a/scripts/Set-SguCedNotificationFirewall.ps1 b/scripts/Set-SguCedNotificationFirewall.ps1 new file mode 100644 index 0000000..5a23fd4 --- /dev/null +++ b/scripts/Set-SguCedNotificationFirewall.ps1 @@ -0,0 +1,31 @@ +[CmdletBinding()] +param() +$ErrorActionPreference = 'Stop' +if ($env:COMPUTERNAME -ine 'SGU-DC02') { + throw 'Run this site-specific firewall configuration on SGU-DC02.' +} +$address = '192.168.54.211' +if (-not (Get-NetIPAddress -AddressFamily IPv4 -IPAddress $address -ErrorAction SilentlyContinue)) { + throw 'The CED management-point address is not assigned to this server.' +} +$listener = @(Get-NetTCPConnection -LocalPort 10123 -State Listen -ErrorAction SilentlyContinue) +if (-not $listener.Count) { throw 'The Configuration Manager notification listener is not running.' } +$program = Join-Path $env:windir 'System32\dllhost.exe' +foreach ($connection in $listener) { + if ((Get-Process -Id $connection.OwningProcess).Path -ine $program) { + throw 'TCP 10123 is owned by an unexpected process; inspect it before opening the firewall.' + } +} +$settings = @{ + Name = 'CED-ConfigMgr-Notification-TCP' + Direction = 'Inbound'; Action = 'Allow'; Enabled = 'True'; Profile = 'Domain' + Protocol = 'TCP'; LocalPort = 10123; LocalAddress = $address + RemoteAddress = '192.168.54.0/24'; Program = $program + Description = 'Allow CED clients to the Configuration Manager notification server; no public or other-subnet access.' +} +if (Get-NetFirewallRule -Name $settings.Name -ErrorAction SilentlyContinue) { + Set-NetFirewallRule @settings +} else { + New-NetFirewallRule @settings -DisplayName 'CED - ConfigMgr client notification TCP 10123' | Out-Null +} +Get-NetFirewallRule -Name $settings.Name | Select-Object Name,Enabled,Action,Profile diff --git a/scripts/Test-SguCedManagedNodes.ps1 b/scripts/Test-SguCedManagedNodes.ps1 index 83471bd..5d7fc5a 100644 --- a/scripts/Test-SguCedManagedNodes.ps1 +++ b/scripts/Test-SguCedManagedNodes.ps1 @@ -3,12 +3,30 @@ param( [Parameter(Mandatory)][PSCredential]$Credential, [string]$TargetOuDn = 'OU=Centro de Experiencia Digital,OU=Laboratorio,DC=lci,DC=lasalle,DC=mx', [string]$Ssid = 'Centro de Experiencia Digital', + [ValidatePattern('^[A-Za-z0-9]{3}$')][string]$SiteCode = 'LCI', [string]$WacThumbprint = 'CF2B7C6899885BF9EB0E59054F8E8AB2D4390513' ) $ErrorActionPreference = 'Stop' Import-Module ActiveDirectory Clear-DnsClientCache $computers = @(Get-ADComputer -SearchBase $TargetOuDn -Filter 'Enabled -eq $true' -Properties DNSHostName) +$notification = @{} +$notificationError = $null +try { + foreach ($resource in (Get-CimInstance -Namespace ("root\SMS\site_"+$SiteCode) -ClassName SMS_CombinedDeviceResources)) { + $notification[$resource.Name] = $resource + } +} catch { $notificationError = $_.Exception.Message } +function Add-NotificationStatus($result) { + $resource = $notification[$result.Name] + # Null means no provider data, not a confirmed offline client. + $result | Add-Member -NotePropertyMembers @{ + NotificationOnline = $(if ($resource) { $resource.CNIsOnline } else { $null }) + NotificationMP = $(if ($resource) { $resource.CNAccessMP } else { $null }) + NotificationLastOnlineTime = $(if ($resource) { $resource.CNLastOnlineTime } else { $null }) + NotificationQueryError = $notificationError + } -PassThru +} $online = @() foreach ($computer in $computers) { $client = [Net.Sockets.TcpClient]::new() @@ -17,7 +35,7 @@ foreach ($computer in $computers) { $available = $connect.AsyncWaitHandle.WaitOne(1000) -and $client.Connected } catch { $available = $false } finally { $client.Dispose() } if ($available) { $online += $computer.DNSHostName } - else { [pscustomobject]@{Name=$computer.Name;Reachable=$false;WifiConnected=$false;ClientRunning=$false;Error='No WinRM TCP connection at current DNS address.'} } + else { Add-NotificationStatus ([pscustomobject]@{Name=$computer.Name;Reachable=$false;WifiConnected=$false;ClientRunning=$false;Error='No WinRM TCP connection at current DNS address.'}) } } $options = New-PSSessionOption -OpenTimeout 10000 -OperationTimeout 60000 if ($online.Count) { @@ -46,10 +64,10 @@ if ($online.Count) { WacRootTrusted=(Test-Path ("Cert:\LocalMachine\Root\"+$thumbprint));Error=$null } }) - $reported + foreach ($result in $reported) { Add-NotificationStatus $result } foreach ($hostname in $online) { if ($reported.PSComputerName -inotcontains $hostname) { - [pscustomobject]@{Name=$hostname.Split('.')[0];Reachable=$false;WifiConnected=$false;ClientRunning=$false;Error='WinRM session or client verification failed after TCP probe.'} + Add-NotificationStatus ([pscustomobject]@{Name=$hostname.Split('.')[0];Reachable=$false;WifiConnected=$false;ClientRunning=$false;Error='WinRM session or client verification failed after TCP probe.'}) } } }