Skip to main content

I have LAPS currently setup in my environment and I would like to make another script that uses the password stored in the LAPS EA for running some commands. I am having a difficult time making a variable that is set to the stored EA in JSS.



Any help would be great!

Are you using macOSLAPS? Or LAPSforMac?


I am using LAPSforMac.


Why wouldn't you just run what you need to as root using JAMF?


I'm using the same method, this is what I'm using in another script that pulls the value from the EA titled "LAPS". You'd need to define the variables, as well.



LAPS="$(/usr/bin/curl -s -f -u $apiUser:$apiPass -H "Accept: application/xml" $apiURL/JSSResource/computers/udid/$udid/subset/extension_attributes | xpath "//extension_attribute[name=$extAttName]" 2>&1 | awk -F'<value>|</value>' '{print $2}')"