No announcement yet.

Enabling TPM and running bitlocker with a batch file?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Enabling TPM and running bitlocker with a batch file?

    Hi all,

    I've been thrown in at the deep end on this (as per) and I have to crack this today really.

    We've had to set up images for some new machines which is part of a wider project to provide imaging for a new customer. The thing is, they want bitlocker and they want it to just work.

    I've been doing my research and have figured a few things out. I can enable the TPM and I can create a recovery key. I can also start bitlocker. What I can't do, is get all this to work seamlessly from a .bat or .cmd script.

    I need some help here. I've seen some WMI scripts online but as soon as I start reading them my brain melts as I don't understand what I'm looking at.

    So far I've been using:
    Manage-bde -tpm -o PASSWORD
    Manage-bde -protectors -add -recoverykey E:\Keys (This is just for testing. We want it backed up in AD)
    Manage-bde -on C:

    For some reason it will work if I run these one at a time manually, but together in a batch file? No dice. Can anyone shed any light? It's likely I am missing something very obvious.