How to create automatic group based on Computer Description?

(imported topic written by Kenz91)

I’m brand new to BigFix and I’m trying to put my servers into automatic groups based on the Computer Description field that’s under the Computer Name tab. I have the field populated with a Tier description. When I try to create an automatic group the inclusion properties doesn’t have Computer Description as one of the choices. Is there a way to do this? Thanks.

(imported comment written by jessewk)

We don’t have a dedicated inspector for the description field, but I just checked and it appears to be stored here:

HKLM\System\CurrentControlSet\Services\lanmanserver\parameters

REG_SZ:srvcomment =

So you can create a custom retrieved property with the following definition and use it to create your automatic group:

values “srvcomment” of keys “HKLM\System\CurrentControlSet\Services\lanmanserver\parameters” of native registry

Make sure you double check that relevance works on both 32 and 64 bit systems.

Jesse

(imported comment written by Kenz91)

Because of corporate policy regarding rights at each site I can’t add a custom retrieved policy with out a major hassle. Can I achieve the same by creating a custom group and use a relavance expression is true

exists key “HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\paramateres” whose (value “srvcomment” of it as string = “Clev Tier 2 6:00AM”) of native registry

would this work? Is my syntax right?

(imported comment written by jessewk)

Yeah, that should work, except you have a typo in your registry key path

(imported comment written by Kenz91)

Yes saw the typos and it seems to be working fine. Now have another question. I will have groups that will have different times but want to be able to have an all encompassing group for Clev Tier 2. I tried to do another relevance but this one doesn’t seem to be working. Do you know what I’m doing wrong?

exists key “HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters” whose (value “srvcomment” of it as string contains “Clev Tier 2”) of native registry

(imported comment written by Kenz91)

Ok I just didn’t give it enough time it worked. Is there a way to have it ignore case when checking the value?

(imported comment written by jessewk)

just cast it to lowercase:

value “srvcomment” of it as string as lowercase contains “clev tier 2”

If you want to get fancy you could also use a regex match to avoid problems with whitespace or to create more complicated matching rules.

(imported comment written by Kenz91)

Thanks Jesse that worked like a charm. One more if you don’t mind. What is the syntax if I want to check if the name of value “srvcomment” exists? I tried this but didn’t seem to work:

exists ( value “srvcomment” of key “HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters” )

Also is there a good reference for these kinds of questions. I’ve looked through various online docs but can’t find these kinds of answers.

Thanks.

(imported comment written by NoahSalzman)

Try:

exists value whose (name of it = “srvcomment”) of key …

(imported comment written by Kenz91)

Noah,

Tried the following but it isn’t populating.

exists value whose ( name of it = “srvcomment”) of key “HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters”

(imported comment written by NoahSalzman)

Ah… sorry, I wasn’t explicit enough. Registry queries need “of native registry”, “of registry”, or "of x32

or x64

registry" on the end.

exists value whose ( name of it = “srvcomment”) of key “HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters” of native registry

(imported comment written by Kenz91)

Doh! I knew that but left it off the end. Thanx