Hey everyone, we are having the good ole' sharing name not matching the AD object name. I decided to put together a little EA to grab the "Computer Account" field from dsconfigad -show. In this script it capitalizes and removes the trailing $. I wanted to post my code and see if anyone can make it better or provide feedback. Currently this is working flawlessly!
#!/bin/sh
# Bound AD Object
# author: matt.lee@fox.com
adObject=`dsconfigad -show | awk '/Computer Account/{print $NF}' | tr '[a-z]' '[A-Z]' | sed s/.$//`
echo "<result>$adObject</result>"