Need help with relevance for a baseline

I am trying to figure out relevance for one of the baseline which has apps in it that gets pushed out to all newly imaged machines. We want to add relevance that sets a criteria and, only those machines that meet up the relevance get the baseline completed.

One relevance is for hostnames of devices: There are three device types - Physicals, Virtuals and Field machines:

(If (exists key “HKEY_LOCAL_MACHINE\System\CNO\Deployment” whose (exists value “ImageType” whose (it = “VCN”) of it) of registry) then (Computer name starts with “H”) else False) AND (If (exists key “HKEY_LOCAL_MACHINE\System\CNO\Deployment” whose (exists value “ImageType” whose (it = “CNO”) of it) of registry) then (Computer name starts with “T” or Computer name starts with “E” or Computer name starts with “F” or Computer name starts with “Z”) else False)) AND (If (exists key “HKEY_LOCAL_MACHINE\System\CNO\Deployment” whose (exists value “ImageType” whose (it = “D4V”) of it) of registry) then (Computer name starts with “D”) else False)) AND (If (exists key “HKEY_LOCAL_MACHINE\System\CNO\Deployment” whose (exists value “ImageType” whose (it = “AGT”) of it) of registry) then (Computer name starts with “G”) else False)

Then all the machines should have:
(exists values “EncryptStatus” whose( it as string as lowercase contains “FullyEncrypted” ) of keys “HKEY_LOCAL_MACHINE\SYSTEM\CNO\Deployment” of ( x64 registries; x32 registries )))

Also:

(exists file “C:\Windows\SysWOW64\rpcnet.exe”)

When I initiate action , it adds AND in between each relevance and it doesn’t work as expected.

relevance.pdf (56.8 KB)

@JasonWalkerCan you please help on this relevance query.

I’m not entirely sure I understand what you’re doing, but if you need “any” of those three computer criteria to match you need to add all three to one relevance clause and combine them with " or ".

Then the check for EncryptStatus in a second clause, which will be AND-joined to the first clause

okay. IYes that’s what the main concern is. Let me try I guess i understand what you are saying.

Might also help if you try and explain what you mean with “and it doesn’t work as expected”

What is not working as expected? Are machine getting targetted that should not be targetted or otherway around.

If you test your sttements in the fixlet debugger you can see there are some foarmatting issues with parenthasies. Each Q: would be its own statement you can use in a fixlet or task. You should hopefully find if you fix the parathasies, that would resolve the issue and you can use the sytatemtn as seperate statements or combine them with ANDs and ORs to suit your needs.

Before

After