It took a while but I found a way to enable the TPM in the BIOS, then activate.
At first glance it should have been easy. Using the CCTK from Dell, set the TPM to enable from a command line and then a reboot and finally activate and a further reboot. But it would always only enable and never activate.
This is because the TPM would create an ownership on the chip itself and while the chip is ‘owned’ it cannot be activated. At least not by the CCTK.
In the end, after a lot of trial and error, I found a way to guarantee the chip is enabled and activated and ready for BitLocker, so here are the steps:
1. Set BIOS password with CCTK: Create a package from the Dell CCTK in ConfigMgr. Use this Package witha Command Line Step in the Task Sequence to set a setup password “cctk –setuppwd=password”
2. Enable TPM with CCTK: Using the Package again, run CCTK to enable TPM “cctk –tpm=on –valsetuppwd=password”
3. Restart Computer – if you perform these actions in the BIOS itself then you don’t need to restart. But here in a Task Sequence the WMI Classes need to be reloaded in order that we can see the Win32_TPM class.
4. Clean the chip ownership: I use a powershell script here but you can use vbscript. If you use powershell then you need to first set the Execution Policy with a command line step: “powershell.exe -noprofile -command “&{set-executionpolicy unrestricted -force}” then call the following script:
$oTPM = gwmi -Class Win32_TPM -Namespace root\CIMV2\Security\MicrosoftTpm
$oTPM.SetPhysicalPresenceRequest(10)
If(!(($oTPM.IsEndorsementKeyPairPresent()).IsEndorsementKeyPairPresent)){
$oTPM.CreateEndorsementKeyPair()
}
If(($oTPM.IsEndorsementKeyPairPresent()).IsEndorsementKeyPairPresent){
$OwnerAuth=$oTPM.ConvertToOwnerAuth(“customrandompassword”)
$oTPM.Clear($OwnerAuth.OwnerAuth)
$oTPM.TakeOwnership($OwnerAuth.OwnerAuth)
}
5. Restart again, this time you will get a prompt at the BIOS to press F10 to accept the chip changes
6. Activate the TPM with CCTK: “cctk –tpmactivation=activate –valsetuppwd=password”
7. Restart again.
That’s it.