Szukaj na tym blogu

piątek, 6 maja 2016

Get BitLocker recovery key from AD using powershell



$DNs = Get-ADComputer -filter * -Properties DistinguishedName | Select-Object @DistinguishedName

Foreach ($DN in $DNs)
{
Get-ADObject -Filter {objectclass -eq 'msFVE-RecoveryInformation'} -SearchBase $DN -Properties 'msFVE-RecoveryPassword' | ft -Property DistinguishedName, name, msFVE-RecoveryPassword -AutoSize | Out-String -Width 1000 | Out-File -FilePath C:\work\PS_AK\BLpass2.txt -Append
}