I'm curious if there is a way that I can use an extension attribute to list the name of the computer object being used for the bind to Active Directory. All I can see in my JSS currently is a bind status of "Not Bound" or the name of the domain it is bound to. Since the name of the computer (hostname for example) does not always match the computer object name, I'd like to have that listed under the Operating System tab. I would imagine this is achievable via an extension attribute script, but I'm not positive which command would be easiest and most reliable to use.
Solved
Ext Attribute - List AD Computer Object Name

Best answer by mm2270
#!/bin/sh
ADCompName=$( dsconfigad -show | awk '/Computer Account/{print $NF}' | sed 's/$$//' )
echo "<result>$ADCompName</result>"
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.