This will send the result of the command straight to the Extension Attribute. There's no error checking, or making sure that Enterprise Connect is installed, but it can get you started.
#!/bin/sh
echo "<result>$(/Applications/Enterprise Connect.app/Contents/SharedSupport/eccl -P adUsername)</result>"

#!/bin/sh
if [ -e /Applications/Enterprise Connect.app ]
then
echo "<result>$(/Applications/Enterprise Connect.app/Contents/SharedSupport/eccl -p adUsername | cut -d":" -f2 | tr -d ' ')</result>"
else
echo "<result>NotInstalled</result>"
fi
Just noticed a small thing. @donmontalvo -p instead of -P
@Chris_Hafner good catch! Looks like -P
returns true
, and -p
returns user's LDAP name. Fixed.
Heh, to be honest, I've stolen this whole thing for new EA's. You guys are the very best!