ganlbarone / FV2Keys

Gets file vault 2 keys via powershell
3 stars 0 forks source link

I tested this on JAMF 10.9.0 - How is the key exposed if the "Get FileVault Recovery Key" button is not clicked? #1

Closed CAJensen01 closed 4 years ago

CAJensen01 commented 5 years ago

I was testing this in my environment, and found that it would return "No FileVault Key" every time. I'm not sure how it is supposed to scrape the key value when the page needs an action to occur (javascript:retrieveFV2Key()) in order for the value to be exposed on the page?

ganlbarone commented 4 years ago

It works by actually emulating what that function does. It would be kinda hard to pinpoint exactly where it is failing for you. Are you passing in the machines ID to the function? If you open the script in the ISE, and run it line by line by selecting a line then pushing f8 would help in determining which piece isnt working properly for you. There is also the account you are using. Please see below blurb. You need to ensure the account has the right permissions to view the recovery key.

Its really easy to use, you just change user\pass\server address variables to match your environment. Whatever user account you enter here needs to have FileVault 2 read permissions or this will not work. You would need to go to management settings \ system settings \ jamf pro user accounts and groups \ select or create an account \ go to privileges tab \ jamf pro server actions then 'View Disk Encryption Recovery Key' put a check in the box here and you are all set to use the below.

Do note when calling this function you need to pass it the machines ID NOT the machines name.

You can see the code sample at the below, you simply need to change the 3 variables user\pass\server at the top of the script and that is it. The readme explains how to call the function for those who may not know.

ganlbarone commented 4 years ago

Please open a new case if you have additional problems. Thanks!