Action script "subscribe to group"

I was wondering if it is possible to subscribe a site to a group using action script?

I believe it is possible as long as the client you’re subscribing meets the subscription relevance. What’s your use case?

I am trying to make joining a group voluntary for select individuals. I am new to scripting in BigFix. I was thinking I would use the subscribe command but not sure if it would work in this situation.

What I would do in this case is have the action that gives the option to the user to join, have it configure a client setting then have the site relevance dedicated to that.

So your site relevance would look for a value of the client setting to determine site relevance and that setting would only be applied by an offer that configures the setting.