Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Usage:
- # Deploy as Custom Attribute in Intune.
- # Rotates the password for IT + outputs it as Custom Attribute
- /usr/local/laps/macOSLAPS -resetPassword > /dev/null
- /usr/local/laps/macOSLAPS -getPassword > /dev/null
- keychain=$(cat /var/root/.GeneratedLAPSServiceName)
- echo $(security find-generic-password -s "$keychain" -w)
Advertisement
Add Comment
Please, Sign In to add comment