Forum Discussion
Intune compliance issues Windows 11 22H2
I don't have twitter 😞 I exported the task from another device where the task runs successfull, but i can't import it, see screenshot. What is a procmon trace?Rudy_Ooms_MVP
Register-ScheduledTask -Xml 'path to .xml' -TaskName "taskname" restore the task (not in that tpm folder but in the root of the scheduled task)
You could download procmon.exe and run it.... when trying to execute that task or running that rundll32 command would record whats happening...
- Jan 31, 2023
Could you try to run these commands.
*Install the required module
Install-Module LocalMDM
*Open a new powershell session with the mta switch
powershell -mta
*Define the csp we want to fetch
$test1 = @"
<SyncBody>
<Get>
<CmdID>2</CmdID>
<Item>
<Target>
<LocURI>./Device/Vendor/MSFT/HealthAttestation/Certificate</LocURI>
</Target>
</Item>
</Get>
</SyncBody>
"@
*send the request to the csp
send-localmdmrequest -SyncML $test1Also wondering how the settings are defined here:
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TPM\WMI\TaskStates
- Jan 31, 2023ehhh i am missing the SignedHealthCert blob in it... there should be something in it... if that's missing...
- buckbaggenJan 31, 2023Brass Contributor
Is this the export you are requesting? Rudy_Ooms_MVP
- buckbaggenJan 31, 2023Brass Contributor
The firmware i cant install with dism /Online /Add-Package /PackagePath:<PATH TO CAB FILE>
Error: The system cannot find the file specified.
When i use msinfo32 and Confirm-SecureBootUEFI and manage-bde -protectors -get $env:systemdrive
All results are good.
BIOS Mode is UEFI
PCR7 is BOUND
(Uses Secure Boot for intergrity validation) <- check! - Jan 31, 2023
It contains some errors :)... (just started it looking at it) but the activityerrors are going to show me where to search
{2147942402; onecore\base\ngscb\tpmhli\lib\registry.cpp; 506; TpmCoreProvisioning.DLL; 1; ; 7072; \TpmCoreProvFunction\activityVerifyDeviceHealth\TpmCoreProvFunction\activityTpmRetrieveHealthCertificate; 2; TpmCoreProvFunction; TpmCore::VerifyDeviceHealth; 6; activityTpmRetrieveHealthCertificate; }, , , , ,EDIT: Yep....ErrorMessage="The X509 certificate cannot be validated. Intermediate CA cannot be trusted as its not present in the TrustedTpm_IntermediateCA store
So it looks like the healthcertificate its intermediate cert isnt trusted (not found/file not found) in that store.... without that trust I guess its hard to successfully transfer data to the service
Let me wake up and try to determine what it should look like so we can have a look at your certificate... (export it from the blob in the registry)
- Rafal_FittJan 30, 2023Iron Contributorperhaps this page will give you some new ideas to test + gather some more low level info: https://github.com/MicrosoftDocs/windows-itpro-docs/issues/5429
- Rafal_FittJan 30, 2023Iron Contributor
please check Application and Services Logs > Microsoft > Windows > BitLocker-API > Management as suggested on https://learn.microsoft.com/en-us/windows-hardware/test/hlk/testref/954cf796-a640-4134-b742-eaf0ed2663ff
- Rafal_FittJan 30, 2023Iron Contributor
1. hmmm, the latest Nuvoton firmware is 7.2.3.1 - https://www.catalog.update.microsoft.com/Search.aspx?q=nuvoton
(from https://learn.microsoft.com/en-us/troubleshoot/windows-server/deployment/pcr7-configuration-binding-not-possible#more-information ) :
2. Open an elevated command prompt, and run the msinfo32 command.
In System Summary, verify that BIOS Mode is UEFI, and PCR7 Configuration is Bound.
3. on my desktop:
TPM:
ID: {GUID}
PCR Validation Profile:
7, 11
(Uses Secure Boot for integrity validation)
^^^^^^^^^^^^^
please verify that you can see this above line on your device - buckbaggenJan 30, 2023Brass Contributor
😄 Rudy_Ooms_MVP
- buckbaggenJan 30, 2023Brass Contributor
The task takes about 30-40 sec. The tpmtool.exe results are added as a screenshot. Now i gonna try with the wpr trace and post the results 🙂 Rudy_Ooms_MVP
- Jan 30, 2023Just went through the whole log file... by the looks of it all succeeds and it even sends out "data" to the dha service.. WHen running the task manually how long does it take before it stops?
I guess its time to run a wpr trace
https://call4cloud.nl/wp-content/uploads/2023/01/log.zip
you can start it by using: wpr -start c:\locationofthefile ... execute the task until it fails... and then
wpr -stop c:\temp\log.etl
In that wpr file I added the provider that logs the device health attestation and the activityVerifyDeviceHealth function... with that log we should know the "why" - Jan 30, 2023Let me fire up my notebook 🙂
- buckbaggenJan 30, 2023Brass Contributor
This?Rudy_Ooms_MVP
- Jan 30, 2023Wondering if others who have the same issue are also having issues with this task. I guess i need to have a procmon trace …. Run procmon. Execute the task wait for it to fail. Stop the procmon trace and save it :)… (or a wpr trace with some specific providers but thats step 2 :p)
- buckbaggenJan 30, 2023Brass Contributor
Yes, see zip fileRudy_Ooms_MVP
- Jan 30, 2023Okay so we can agree the task works…. A bit 🙂 . As one of those things that task should do is creating the health certificate… but i guess the second part to fetch the dha data to send it to the dhaservice doesnt… mmm thats weird… when looking at the windows\logs\measuredboot folder is there data in it?
- buckbaggenJan 30, 2023Brass Contributor
Deleted HealthCert, runned the task (stil fails) but there is a new HealthCert now, see screenshot.Rudy_Ooms_MVP
- Jan 30, 2023
When you delete that reg key and rerun the task does it get recreated (should be recreated)
- buckbaggenJan 30, 2023Brass Contributor
The DLL file is avaible in system32, see screenshot. The healthcert, also see screenshot 🙂 Rudy_Ooms_MVP
- Jan 30, 2023
Yep, thats what i was afraid of. As it calls up on the dll… as the other task does work (tpm maintenance) the tpmtasks.dll should be on the device.
working with procmon and reading the output could be a bit hard…
besides procmon… i am wondering if the healthcertifcate is created in the regitry currentcontrolset\services\tpm\wmi
- buckbaggenJan 30, 2023Brass Contributor
Import worked, thanks! But still the same error 😞
I've downloaded procmon, but don't know how to use to get the right results you need?
- Jan 30, 2023ow wait you also exported it manually right?
I guess schtasks.exe could import it
schtasks.exe /create /tn TaskName /xml "C:\temp\Tpm-HASCertRetr.xml" - buckbaggenJan 30, 2023Brass ContributorWhen i create a new task, export it and then import it back again i get the same error hmmm
- josvdsJan 30, 2023Brass ContributorIt looks like the XML file you provided (c:\tpm-hascertretr.xml) is invalid.
- buckbaggenJan 30, 2023Brass Contributor
My Powershell skills are very low... Can you see what i'm doing wrong?Rudy_Ooms_MVP