Guest User

customattribute

a guest
Jul 10th, 2024
953
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/sh
  2. # Usage:
  3. # Deploy as Custom Attribute in Intune.
  4. # Rotates the password for IT + outputs it as Custom Attribute
  5. /usr/local/laps/macOSLAPS -resetPassword > /dev/null
  6. /usr/local/laps/macOSLAPS -getPassword > /dev/null
  7. keychain=$(cat /var/root/.GeneratedLAPSServiceName)
  8. echo $(security find-generic-password -s "$keychain" -w)
  9.  
Advertisement
Add Comment
Please, Sign In to add comment