Relevance Question (debug) about lowercase

(imported topic written by rharmer91)

This should be simple, but I must be doing something wrong. I’m trying to find all of our Windows 2000 workstations that are in our domain. For some odd reason, some machines in the domain picked up FAIRVIEW as their domain, and other machines picked up Fairview.org. I was trying to use ‘contains “fairview” as lowercase’, but it’s not working. I believe I also tried ‘string values of it as lowercase’. Also: if I pull that out of the relevance, a lot of machines show up, so I know it’s that piece.

Thoughts?

(exists ((major version of it as string & “.” & minor version of it as string & “.” & (build number high of it + build number low of it) as string ) of operating system) whose (it as string as lowercase contains “5%2e0%2e2195” as lowercase)) AND(string value of select “Name from Win32_OperatingSystem” of wmi does not contain “Server”) AND (string values of selects “Domain from Win32_ComputerSystem” of wmi contains “fairview” as lowercase)

(imported comment written by Lee Wei)

Hi Rich,

We need to change the order of the “as lowercase” casting.

Notice the difference between the following. We want the 2nd form.

q: “Fairview” contains “fairview” as lowercase

A: False

q: “Fairview” as lowercase contains “fairview”

A: True

I think I have made the change for you in the following statement:

(exists ((major version of it as string & “.” & minor version of it as string & “.” & (build number high of it + build number low of it) as string ) of operating system) whose (it as string as lowercase contains “5%2e0%2e2195” as lowercase)) AND(string value of select “Name from Win32_OperatingSystem” of wmi does not contain “Server”) AND (string value of selects “Domain from Win32_ComputerSystem” of wmi as lowercase contains “fairview”)

The first condition looks more complicated than it needs to be. You used the hex representation for period “.”

I wonder if you were having a problem? This following should have suffice, and do test it in your environment.

(following text of last " " of (operating system as string)) contains “5.0.2195”

(imported comment written by rharmer91)

I just cut that code out of a pre-existing relevance statement that “you guys” created.

I’ll pop that code in and see how it works.

Thanks!

Rich