mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
9e24b92fbf
Customer field case: pre-provisioned devices with the ConfigMgr client as a
blocking app occasionally park the user ESP at "Apps (Identifying)" for days.
Root cause (verified against the EnrollmentStatusTracking CSP doc): only a
"ConfigMgr" provider is registered under Device\Setup\Apps\PolicyProviders
(no "Sidecar" = IME) and TrackingPoliciesCreated never becomes 1 - a wait the
CSP defines WITHOUT any timeout. Renaming the key to Sidecar unblocks
immediately. Microsoft documents that ESP providers are not aware of each
other and that pre-provisioning is unsupported with co-management.
New always-on esp_policy_provider_stalled tripwire, generalized to any
provider in both kinds (Setup/Apps TrackingPoliciesCreated != 1,
DevicePreparation InstallationState not in {2,3}):
- EspPolicyProviderProbe: fail-soft registry read of the
EnrollmentStatusTracking mirror (device + user-SID scopes), defensive
value parsing (missing/unparseable = incomplete), ScopedOverride test seam.
Research and CSP contract quotes captured in the XML doc header.
- EspPolicyProviderStallDetector: pure EvaluateStallTransition on a 15-min
continuous-incompleteness dwell (resets on completion/disappearance;
absent key = normal early enrollment), one-shot per provider,
StartupEventGate fingerprint over the sorted stalled key set for
cross-restart dedup. Warning + ImmediateUpload via InformationalEventPost;
purely observational, no decision-engine coupling, no config toggle,
no ConfigVersion bump (disk_space_low precedent).
- EspPolicyProviderStallHost: 60-s wall-clock tick, deliberately outside the
StallProbe idle gate (idle clock resets on session activity) and the
idle-stopped periodic collectors.
- Registered in Constants.EventTypes, MCP resource-catalog (health_events),
web gather-rule autocomplete (stall category).
Guardrail companion: SOFTWARE\Microsoft\Windows\Autopilot joins the
gather-rule registry allowlist ("Autopilot / OOBE / Setup") so tenants can
build custom rules on the subtree (e.g. not_exists on the Sidecar provider
key); generated web mirror regenerated via combine.js; positive + sibling-
spoof guard tests added.
Docs: OKF concept doc agent/esp-policy-provider-stall.md (+ index/log).
Tests: 22 new detector tests (pure transition matrix + emission surface incl.
the ConfigMgr-only customer scenario and gate-across-restart dedup); agent
suite 2013/2013, web vitest 589/589 + tsc clean, MCP 449 passed incl.
event-types-drift.
Both the detector and the embedded allowlist take effect with the next agent
release.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
256 lines
7.8 KiB
JSON
256 lines
7.8 KiB
JSON
{
|
|
"registryPrefixes": [
|
|
{
|
|
"category": "MDM / Enrollment",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\Enrollments",
|
|
"SOFTWARE\\Microsoft\\EnterpriseDesktopAppManagement",
|
|
"SOFTWARE\\Microsoft\\Provisioning",
|
|
"SOFTWARE\\Microsoft\\PolicyManager",
|
|
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\MDM"
|
|
]
|
|
},
|
|
{
|
|
"category": "AAD / Entra Join",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\IdentityStore",
|
|
"SYSTEM\\CurrentControlSet\\Control\\CloudDomainJoin"
|
|
]
|
|
},
|
|
{
|
|
"category": "Windows Update / WUfB",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\WindowsUpdate",
|
|
"SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate"
|
|
]
|
|
},
|
|
{
|
|
"category": "BitLocker",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\BitLocker",
|
|
"SYSTEM\\CurrentControlSet\\Control\\BitLockerStatus"
|
|
]
|
|
},
|
|
{
|
|
"category": "Network / Proxy",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",
|
|
"SYSTEM\\CurrentControlSet\\Services\\Tcpip"
|
|
]
|
|
},
|
|
{
|
|
"category": "Autopilot / OOBE / Setup",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup",
|
|
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OOBE",
|
|
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
|
|
"SOFTWARE\\Microsoft\\Windows\\Autopilot"
|
|
]
|
|
},
|
|
{
|
|
"category": "TPM",
|
|
"prefixes": [
|
|
"SYSTEM\\CurrentControlSet\\Services\\TPM",
|
|
"SOFTWARE\\Microsoft\\Tpm"
|
|
]
|
|
},
|
|
{
|
|
"category": "Secure Boot",
|
|
"prefixes": [
|
|
"SYSTEM\\CurrentControlSet\\Control\\SecureBoot"
|
|
]
|
|
},
|
|
{
|
|
"category": "Intune IME",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\IntuneManagementExtension"
|
|
]
|
|
},
|
|
{
|
|
"category": "Certificates (SCEP)",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\SystemCertificates",
|
|
"SOFTWARE\\Policies\\Microsoft\\SystemCertificates"
|
|
]
|
|
},
|
|
{
|
|
"category": "Servicing",
|
|
"prefixes": [
|
|
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing"
|
|
]
|
|
},
|
|
{
|
|
"category": "RealmJoin",
|
|
"prefixes": [
|
|
"SYSTEM\\CurrentControlSet\\Services\\realmjoin",
|
|
"SOFTWARE\\RealmJoin"
|
|
]
|
|
}
|
|
],
|
|
"filePrefixes": [
|
|
"C:\\ProgramData\\Microsoft\\IntuneManagementExtension\\Logs",
|
|
"C:\\Windows\\CCM\\Logs",
|
|
"C:\\Windows\\Logs",
|
|
"C:\\Windows\\Panther",
|
|
"C:\\Windows\\SetupDiag",
|
|
"C:\\ProgramData\\Microsoft\\DiagnosticLogCSP",
|
|
"C:\\Windows\\SoftwareDistribution\\ReportingEvents.log"
|
|
],
|
|
"wmiQueryPrefixes": [
|
|
"SELECT * FROM Win32_OperatingSystem",
|
|
"SELECT * FROM Win32_ComputerSystem",
|
|
"SELECT * FROM Win32_BIOS",
|
|
"SELECT * FROM Win32_Processor",
|
|
"SELECT * FROM Win32_BaseBoard",
|
|
"SELECT * FROM Win32_Battery",
|
|
"SELECT * FROM Win32_TPM",
|
|
"SELECT * FROM Win32_NetworkAdapter",
|
|
"SELECT * FROM Win32_NetworkAdapterConfiguration",
|
|
"SELECT * FROM Win32_DiskDrive",
|
|
"SELECT * FROM Win32_LogicalDisk",
|
|
"SELECT * FROM SoftwareLicensingProduct"
|
|
],
|
|
"eventLogChannels": [
|
|
{
|
|
"category": "Core Windows logs",
|
|
"channels": [
|
|
"Application",
|
|
"System",
|
|
"Setup",
|
|
"Microsoft-Windows-Kernel-Boot",
|
|
"Microsoft-Windows-Diagnostics-Performance"
|
|
]
|
|
},
|
|
{
|
|
"category": "MDM / Enrollment",
|
|
"channels": [
|
|
"Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider",
|
|
"Microsoft-Windows-ModernDeployment-Diagnostics-Provider",
|
|
"Microsoft-Windows-Provisioning-Diagnostics-Provider",
|
|
"Microsoft-Windows-AAD",
|
|
"Microsoft-Windows-User Device Registration"
|
|
]
|
|
},
|
|
{
|
|
"category": "ESP / Shell / Apps",
|
|
"channels": [
|
|
"Microsoft-Windows-Shell-Core",
|
|
"Microsoft-Windows-AppXDeployment",
|
|
"Microsoft-Windows-AppXDeploymentServer",
|
|
"Microsoft-Windows-AppReadiness",
|
|
"Microsoft-Windows-Store"
|
|
]
|
|
},
|
|
{
|
|
"category": "Security posture / Crypto",
|
|
"channels": [
|
|
"Microsoft-Windows-BitLocker-API",
|
|
"Microsoft-Windows-BitLocker-DrivePreparationTool",
|
|
"Microsoft-Windows-TPM-WMI",
|
|
"Microsoft-Windows-CertificateServicesClient-Lifecycle-System"
|
|
]
|
|
},
|
|
{
|
|
"category": "Update / Servicing",
|
|
"channels": [
|
|
"Microsoft-Windows-WindowsUpdateClient"
|
|
]
|
|
},
|
|
{
|
|
"category": "Logon / Session",
|
|
"channels": [
|
|
"Microsoft-Windows-Winlogon",
|
|
"Microsoft-Windows-User Profile Service",
|
|
"Microsoft-Windows-GroupPolicy",
|
|
"Microsoft-Windows-TaskScheduler"
|
|
]
|
|
},
|
|
{
|
|
"category": "Network",
|
|
"channels": [
|
|
"Microsoft-Windows-NetworkProfile",
|
|
"Microsoft-Windows-Dhcp-Client",
|
|
"Microsoft-Windows-DNS-Client",
|
|
"Microsoft-Windows-NCSI",
|
|
"Microsoft-Windows-WLAN-AutoConfig",
|
|
"Microsoft-Windows-Time-Service"
|
|
]
|
|
}
|
|
],
|
|
"blockedEventLogChannels": [
|
|
"Security",
|
|
"Microsoft-Windows-PowerShell",
|
|
"Windows PowerShell",
|
|
"Microsoft-Windows-Sysmon"
|
|
],
|
|
"allowedCommands": [
|
|
{
|
|
"category": "TPM and Security",
|
|
"commands": [
|
|
"Get-Tpm",
|
|
"Get-SecureBootPolicy",
|
|
"Get-SecureBootUEFI -Name SetupMode"
|
|
]
|
|
},
|
|
{
|
|
"category": "BitLocker",
|
|
"commands": [
|
|
"Get-BitLockerVolume -MountPoint C:"
|
|
]
|
|
},
|
|
{
|
|
"category": "Network",
|
|
"commands": [
|
|
"Get-NetAdapter | Select-Object Name, Status, InterfaceDescription, MacAddress, LinkSpeed",
|
|
"Get-DnsClientServerAddress | Select-Object InterfaceAlias, ServerAddresses",
|
|
"Get-NetIPConfiguration | Select-Object InterfaceAlias, IPv4Address, IPv4DefaultGateway, DNSServer",
|
|
"netsh winhttp show proxy",
|
|
"ipconfig /all"
|
|
]
|
|
},
|
|
{
|
|
"category": "Domain / Identity",
|
|
"commands": [
|
|
"nltest /dsgetdc:",
|
|
"dsregcmd /status"
|
|
]
|
|
},
|
|
{
|
|
"category": "Certificate",
|
|
"commands": [
|
|
"certutil -store My",
|
|
"$c = Get-ChildItem Cert:\\LocalMachine\\My; if ($c) { $c | Select-Object Subject, Thumbprint, Issuer, NotBefore, NotAfter, HasPrivateKey | ConvertTo-Json } else { '{\"CertificateCount\": 0}' }"
|
|
]
|
|
},
|
|
{
|
|
"category": "Windows Update",
|
|
"commands": [
|
|
"Get-HotFix | Select-Object -First 10 HotFixID, InstalledOn, Description"
|
|
]
|
|
},
|
|
{
|
|
"category": "Autopilot / Hardware Identity",
|
|
"commands": [
|
|
"try { $cs = Get-CimInstance -ClassName Win32_ComputerSystem; $bios = Get-CimInstance -ClassName Win32_BIOS; $hash = $null; try { $hash = (Get-CimInstance -Namespace root/cimv2/mdm/dmmap -ClassName MDM_DevDetail_Ext01 -Filter \"InstanceID='Ext' AND ParentID='./DevDetail'\" -ErrorAction Stop).DeviceHardwareData } catch { $hash = \"ERROR: $($_.Exception.Message)\" }; [pscustomobject]@{ Manufacturer = $cs.Manufacturer; Model = $cs.Model; SystemSKU = $cs.SystemSKUNumber; SerialNumber = $bios.SerialNumber; BiosVersion = $bios.SMBIOSBIOSVersion; HardwareHash = $hash } | ConvertTo-Json -Compress } catch { @{ error = $_.Exception.Message } | ConvertTo-Json -Compress }"
|
|
]
|
|
}
|
|
],
|
|
"diagnosticsPathPrefixes": [
|
|
"C:\\ProgramData\\AutopilotMonitor",
|
|
"C:\\ProgramData\\Microsoft\\IntuneManagementExtension\\Logs",
|
|
"C:\\Windows\\Panther",
|
|
"C:\\Windows\\Logs",
|
|
"C:\\Windows\\SetupDiag",
|
|
"C:\\Windows\\SoftwareDistribution\\ReportingEvents.log",
|
|
"C:\\Windows\\System32\\winevt\\Logs",
|
|
"C:\\Windows\\CCM\\Logs",
|
|
"C:\\ProgramData\\Microsoft\\DiagnosticLogCSP",
|
|
"C:\\ProgramData\\Microsoft\\Windows\\WER",
|
|
"C:\\Windows\\Logs\\CBS",
|
|
"C:\\Install\\Log"
|
|
],
|
|
"blockedFilePrefixes": [
|
|
"C:\\Users"
|
|
]
|
|
}
|