Hey guys. I have a script I wrote to use as an extension attribute to check and see if Remote Management is enabled on a machine or not. However, while it runs really well locally, it only returns 'On' when used in an extension attribute, even if I know for a fact Remote Management has been disabled.
I've included the script below. Anyone have any thoughts?
#!/bin/sh
Status=`launchctl list | grep '^d.*RemoteDesktop.*'`
if [ -z "${Status}" ]
then echo "Off"
else
echo "On"
fi