The following Applescript will show a selectable, scrollable list of machine accounts in OD, then show which ComputerGroup(s) that computer belongs to. This is a quick way to confirm membership without having to open WorkGroup Manager, and especially handy to allow your techs to verify without being a directory admin in OD.
You can download the script here, or copy/paste the code below into AppleScript Editor. You only need to specify your OD server address.
-- Set the domain to your OD domain set domain to "od.school.edu" set computerList to paragraphs of (do shell script "dscl /LDAPv3/" & domain & space & "-list /Computers") set computerName to choose from list computerList set memberList to (do shell script "dscl /LDAPv3/ecod.as.emory.edu search /ComputerGroups Member" & space & computerName & space & "| grep Member | cut -f1-1") display dialog memberList
The reason I show a list of computers, instead of asking for one to be typed is because it is case sensitive. So it’s more consistent to select from a list.