I'm trying to create an EA to show when the device is added to domain, so then I can make a smart group based off of that.
The script I'm trying to use is:
#!/bin/bash
domainName=`echo show com.apple.opendirectoryd.ActiveDirectory |
scutil | grep DomainNameFlat | awk '{print $3}'`
echo "$domainName "
When I run that in terminal, it gives me the result that I expect, but when I use that script as an EA, none of my devices are reporting in that field yet.