Posted on 05-04-2015 06:26 AM
Just in case anyone needs a Centrify Extension Attribute:
#!/bin/sh
mode=`adinfo | grep "CentrifyDC mode" | awk '{print $3}'`
if [ "$mode" == "connected" ]; then
echo "<result>Connected</result>"
elif [ "$mode" == "disconnected" ]; then
echo "<result>Disconnected</result>"
else
echo "<result>NA</result>"
fi
Posted on 05-04-2015 07:06 AM
Works great...thanks!
Corbin
Posted on 06-23-2015 07:31 AM
@kenergy Please forgive the stupid question but how does one get this into XML format? I thought Xcode could change it from a script to a xml format but apparently it can't.
Thanks,
Posted on 06-23-2015 07:34 AM
@Kyuubi Curious, but why do would need this in xml format?
Posted on 06-23-2015 07:41 AM
I copied the script and pasted it into Xcode file. Saved as a .sh and then tried to upload it. JSS said it needed to be in a xml format.
Posted on 06-23-2015 07:41 AM
How wrong am I??? Be gentle.
Posted on 06-23-2015 07:43 AM
Figured it out.. The pressure of looking stupid helped a lot. Making a new Extension Att instead of trying to upload this one. Thanks guys.
Posted on 06-23-2015 07:44 AM
Oh, I see. You can create Extension Attributes directly in your JSS by going to Computer Management -> Extension Attributes, then clicking the "New" button. Change the Input Type drop down menu to Script and a new field will appear below that. Paste the shell script into that field, name it, set anything else you need for it and Save.
Edit: Glad you figured it out :)