0

So I am making a script that will enable Bitlocker through powershell. The reason I am making this script it so I can place it on my companies MSP, making automation that much easier. I have the script that enables bitlocker and makes the recovery key for bitlocker; however, it is company policy that we place the computer name at the beginning of the file name.

I am basically wondering if there is a way to get the full path of this newly created bitlocker key, that way I can rename it? If there is a better way to do this, then please let me know. Basically I want to add local computer name to the beginning of the file name.

Get-BitLockerVolume | Enable-BitLocker -EncryptionMethod Aes128 -RecoveryKeyPath "path to key folder" -RecoveryKeyProtector
Tbuente
  • 1
  • 1
  • Well, so I have a script that can enable bitlocker and create the key in our specified location, but I need the actualy file name to be (example: Desktop-12FD24 BitLocker Recovery Key XXXXXX-XXXX-XXXX-XXXX-XXXX, rather than just BitLocker Recovery Key XXXXXX-XXXX-XXXX-XXXX-XXXX). – Tbuente Aug 01 '19 at 17:33
  • I haven't used the BitLocker cmdlets in a while, but I'm pretty sure the `XXXXXXX-XXX...` part of the name is the KeyProtectorID, so just grab that from the output of `Enable-BitLocker` and use that to address the new file on disk – Mathias R. Jessen Aug 02 '19 at 09:34

0 Answers0