Proxy Setting Smart Group?

NealIV
Contributor

Is there a way to create a smart group based on if the user has Automatic Proxy Configuration set?

1 ACCEPTED SOLUTION

justinworkman
Contributor

I just tested this as an extension attribute:

#!/bin/sh
proxystatus=$(cat /Library/Preferences/SystemConfiguration/preferences.plist | grep -A 1 Proxy | grep -o 1)
echo "<result>$proxystatus</result>"

If you make a Smart Group based on proxystatus is 1, it should do what you're needing.

View solution in original post

4 REPLIES 4

nkalister
Valued Contributor

you'd first need to create an extension attribute that returns the status of that proxy setting. then, you could create your smart group based on the extension attribute.

justinworkman
Contributor

I just tested this as an extension attribute:

#!/bin/sh
proxystatus=$(cat /Library/Preferences/SystemConfiguration/preferences.plist | grep -A 1 Proxy | grep -o 1)
echo "<result>$proxystatus</result>"

If you make a Smart Group based on proxystatus is 1, it should do what you're needing.

NealIV
Contributor

Thanks!

craig_george
New Contributor

I can't get this to work on mountain lion, any recommendation?