It has been a while since I have posted anything, mainly due to changing jobs and the time spent with my ever growing family. This is not to say that I have not been keeping up with scripting development...far from it!
I had an interesting one today where a request came in for the following :
I will try to post a few more things soon as I have been doing some quite interesting stuff!
cheers
Adam
I had an interesting one today where a request came in for the following :
“I need the bitlocker recovery password for a deleted computer object”As my current environment does not support the AD cmdlets, I looked to the quest tool set and was pleasantly surprised. Here is what I came up with, commented in line...
#for easy editing, define the computername that has been deletedPlease note that you do need to be Domain Admin (or equivalent) to be able to read the Deleted Objects Container.
$compname = "ABC12345"
#search AD including Deleted objects (-tombstone) for recovery information objects and filter where the last known parent contains the computer name. Then just return the password
$recoverykey = Get-QADObject -Tombstone -Type "msFVE-RecoveryInformation" -SizeLimit 0 -Includedproperties msFVE-RecoveryPassword -SearchRoot "CN=Deleted Objects,DC=domain,DC=com" | ? {$_.lastknownparent -like "*$compname*"} | select msFVE-RecoveryPassword
#display the password
$recoverykey
I will try to post a few more things soon as I have been doing some quite interesting stuff!
cheers
Adam
Interested in why the recovery password was needed for a computer account that had been deleted?
ReplyDeleteIf a computer object is removed by accident and the hard drive is still encrypted, you would need the recovery key to boot the PC.
ReplyDeleteI've changed the OU to get the recovery password for an active computer but I am not getting anything printed. Any idea?
ReplyDeletethe {$_.lastknownparent -like "*$compname*"} will not work for a live computer account.
ReplyDeleteyou can use {$_.ParentContainer -like "*$compname*"} but a more efficient way for a single computer object would be to set the searchroot to the computer object DN. eg :
-searchroot "cn=$compname,ou=compOU,dc=domain,dc=com".
regards
Adam