I am currently trying to write a relevance expression that will check the member of the local admin group on each machine. From searching these forums I have found the following works reasonably well.
(members of local group “Administrators” as string)
Testing with Q&A I have the following
q: (members of local group “Administrators” )
A: computername\administrator
A: domain\Domain Admins
A: domain\user1
A: domain\user2
I would like to see if there is a way of limiting the results to only those that start with domain. This way i will only get the domain accounts that are administrators on the machine.
I would have thought it would be something like
(members of local group “Administrators” as string whose name of it starts with “domain”)
However that doesnt seem to work. Im pretty new to relevance language and still learning so any help would be greatly appreciated.
A couple issues with your statement. First your parentheses were in the wrong place. You need your object (members of local group administrators as sting) to be in parentheses then you also need your statement following whose in parentheses.
Also, since your casting your object as sting, you cannot ask for name of it (name of it is not even a valid property for memeber of group)…
I’m attaching the Relevance Language guide (I couldn’t find a working link for it online). This will explain the basics of the relevance language. It will explain things like how to do a whose clause.