Closed CAJensen01 closed 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.
Please open a new case if you have additional problems. Thanks!
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?