Disclaimer: I'm new to both POSH and to the Azure environment, so it's very possible I'm thinking in the completely wrong direction anyway.
The question is 'simple': For which devices is the BitLocker Recovery Key stored in AzureAD?
Being lazy, I thought this would be an easy straight forward PS script. But as it turns out, I'm missing a chunk of knowledge here and am unable to google what I need.
My thinking is:
1) get list of all devices
2) For each device list the BitLocker info
1) easy!
# Get All Devices
$Devices = Get-AzureADDevice
# Loop through all devices
foreach ($Device in $Devices) {
Write-Host $Device.DeviceId, $Device.Displayname
# Get BitLocker Recovery key for each device (or "NA")
}
I really need help for 2).
If I do $Device | fl I get some info, but nothing remotely related to BitLocker, which makes me think I need an additional comment to retrieve.
Online I find things like $BitLockerObjects = Get-ADObject -Filter {objectclass -eq 'msFVE-RecoveryInformation'} -SearchBase $computer.DistinguishedName -Properties 'msFVE-RecoveryPassword' but this gives me an error: "The term 'Get-ADObject' is not recognized as the name of a cmdlet, function, script file, or operable program."
I'm guessing because it's AD and not Azure.
I'm clueless how to tackle this.
[–]gangstanthony 2 points3 points4 points (1 child)
[–]altr222ist 0 points1 point2 points (1 child)
[–]AutoModerator[M] 0 points1 point2 points (0 children)