Domain User member of Local Group Relevance

(imported topic written by SystemAdmin)

Hi,

I would like to have relevance for a task of “if user DOMAIN\User123 is member of local group Distributed Com Users” then this task is relevant.

I have got the simple part of members of local group “Distributed Com Users” but I can’t seem to get how to check if a user is a member of that group, any help would be appreciated.

Thanks

Anthony

(imported comment written by SystemAdmin)

How about:

IF (concatenation “|” of (members of local group “Distributed Com Users” as string)) contains “DOMAIN\User123” THEN (“Member”) ELSE (“Outcast”)

-Jim

(imported comment written by SystemAdmin)

Thanks Jim, I was more looking for a “this task is relevant if this is true” type of relevance, would this still work? Is there a way to make it case insensitive?

(imported comment written by SystemAdmin)

Well, you had started down the road of using the IF statement, and as some people sem to like the “IF (test=true) THEN (True) ELSE (False)”, I thought that’s what you wanted.

Just put the relevance used to do the checking in on its own (including the extra code to force lowercase):

(concatenation “|” of (members of local group “Distributed Com Users” as string as lowercase)) contains (“DOMAIN\User123” as lowercase)

-Jim

(imported comment written by SystemAdmin)

Thank you for the quick replies, that works perfectly!

(imported comment written by SystemAdmin)

jwilkinson

Well, you had started down the road of using the IF statement, and as some people sem to like the “IF (test=true) THEN (True) ELSE (False)”

It bothers me at a deep, fundamental level when people do that

_

(imported comment written by JackCoates91)

How about

IF (test=false) THEN (False) ELSE (True)

? :slight_smile: