Changing Client settings for relays

(imported topic written by SystemAdmin)

I manually changed the setting for a single client by right-clicking and setting the relays.

I would like to use the resulting commands in a fixlet and make it a policy for select subnets and if the settings for the client are automatic.

Here is the resulting right click running for the change:

setting “__RelaySelect_Automatic”=“0” on “Wed, 02 Feb 2011 19:25:52 +0000” for client

setting “__RelayServer1”=“http%3a%2f%2fWSPRD305%2eDom1%2eSchneider%2ecom%3a52311%2fbfmirror%2fdownloads%2f” on “Wed, 02 Feb 2011 19:25:52 +0000” for client

setting “__RelayServer2”=“http%3a%2f%2fWSPRD306%2eDom1%2eSchneider%2ecom%3a52311%2fbfmirror%2fdownloads%2f” on “Wed, 02 Feb 2011 19:25:52 +0000” for client

Can I put this same 2 settings command into a action script? I would replace the date with {now} like this

setting “__RelaySelect_Automatic”=“0” on “{now}” for client

setting “__RelayServer1”=“http%3a%2f%2fWSPRD305%2eDom1%2eSchneider%2ecom%3a52311%2fbfmirror%2fdownloads%2f” on “{now}” for client

setting “__RelayServer2”=“http%3a%2f%2fWSPRD306%2eDom1%2eSchneider%2ecom%3a52311%2fbfmirror%2fdownloads%2f” on “{now}” for client

My relevance would look something like this:

exists (addresses whose (it as string != “0.0.0.0”) of ip interfaces whose (not loopback of it) of network) whose (it as string as lowercase contains “161.222.56” as lowercase)

But need to add a command to check if the client setting for __RelaySelect_Automatic = 1 as well.

So, what I’m looking for is the correct syntax for relevance and the coding for the action script to run all 3 setting commands

I plan to make this a policy so that nay new clients I introduce to the network on the 161.222.56.X network will automatically be changed to a manula relay selection