Policy to set _BESRelay_Register_Affiliation_AdvertisementList

(imported topic written by Bigfeex)

I’m attempting to deploy a policy against an automatic computer group that sets the “_BESRelay_Register_Affiliation_AdvertisementList” settings for the systems therein. I’m attempting to create this from a “take custom action” so I can name the object and don’t end up with a bunch of ambiguously named “Change ‘_BESRelay_Register_Affiliation_AdvertisementList’” actions. I also want to make this a policy so that the list of systems in the automatic group will have this setting reapplied should it be removed by mistake.

In the “take custom action”, I’m applying the below relevance and action as a policy to be reapplied whenever relevant again. The success criteria is the below relevance evaluting to false.

Relevance:

(((not exists setting “_BESRelay_Register_Affiliation_AdvertisementList” of client) AND (value of it does not equal ((“corp;*”) as string))) of setting “_BESRelay_Register_Affiliation_AdvertisementList” of client)

action script:

setting “_BESRelay_Register_Affiliation_AdvertisementList”=“corp%3b%2a” on “{now}” for client

With the desired setting(s) removed from the systems in the auto group, I’m not oberving that this action is catching the systems with the above relevance, therefore, not taking the desired action. What am I missing in my relevance that will pick these systems up if those values are missing or not correct?

Thank you

(imported comment written by Bigfeex)

I think I just figured it out in writing this up…I need to use “corp%3b%2a” in the relevance clause, right, rather than “corp;*”?

(imported comment written by Bigfeex)

nope, this isn’t working either…

(((not exists setting “_BESRelay_Register_Affiliation_AdvertisementList” of client) AND (value of it does not equal ((“corp%3b%2a”) as string))) of setting “_BESRelay_Register_Affiliation_AdvertisementList” of client)

(imported comment written by Bill.Ehardt)

What about shortening it to something like this?

not exists setting “_BESRelay_Register_Affiliation_AdvertisementList” whose (value of it as lowercase = “corp%3b%2a”) of client

You can also try the “corp;*” but not sure if that will work…

(imported comment written by Bill.Ehardt)

The problem with your statement was you were saying: “The setting doesn’t exist, and the setting exists but it isn’t this value”

If you wanted two statements, you could always do an OR instead.

(imported comment written by Bigfeex)

yup, this is working.

not exists setting “_BESRelay_Register_Affiliation_AdvertisementList” whose (value of it as lowercase = “corp%3b%2a”) of client

Thank you again!