This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (usage -- Get-LocalMembers GROUPNAME) | |
Get-LocalMembers () { | |
if ! dscl . list /Groups/"$1" >> /dev/null 2>&1;then | |
echo "A Local Group with the name $1 does not exist." | |
exit 1 | |
else | |
dscl . -list /Users | \ | |
while read user | |
do printf "$user " | |
dsmemberutil checkmembership -U "$user" -G "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: Calum Hunter | |
# Date: 28/11/2016 | |
# Version: 1.0 | |
# Purpose: To generate a Mac UID from the objectGUID attribute | |
# (GeneratedUID) in AD. | |
# This uses the same method that the Apple | |
# AD Plugin uses |