But in the above query the computer name is case sensitive so if the computer name doesn’t match with the computer name (Same computer name but case sensitive) present in the Tem server then it returns nothing.
Could anybody Kindly help me with a query which can resolve this problem.
I would also like to understand an api query which will fetch the last reporting time of the server.
For the session relevance query, you can simply cast both sides of the string comparison to ‘as lowercase’ or ‘as uppercase’ to avoid case sensitivity. Some examples:
"A" = "a" -> FALSE ("A" as lowercase) = ("a" as lowercase) -> TRUE
You could also use regex to accomplish this as well.
Here’s a sample session relevance query that returns the ID, Computer Name, and Last Report Time in a single query filtered on a given computer name without case sensitivity:
(id of it, name of it, last report time of it) of bes computers whose (name of it as lowercase starts with "ComputerName" as lowercase)
Here’s a variation that will return True or False based on if the device reported in within the last day:
(id of it, name of it, last report time of it > (now - 1 * day)) of bes computers whose (name of it as lowercase starts with "ComputerName" as lowercase)