I am using the following relevance query in a .net core web app, using the API. It works and pulls all of my servers as expected:
string relevanceQuery = @"
(
id of it,
name of it,
ip addresses of it,
last report time of it
) of bes computers";
However, when I add the lines to the query to pull reg values as well, i get “No results found”. I’ve verified the reg key/values are all there.
string relevanceQuery = @"
(
id of it,
name of it,
ip addresses of it,
last report time of it,
(if exists values ""PatchDayOffset"" of keys ""HKEY_LOCAL_MACHINE\SYSTEM\KREM"" of registry then value of it as string else ""-1""),
(if exists values ""PatchHour"" of keys ""HKEY_LOCAL_MACHINE\SYSTEM\KREM"" of registry then value of it as string else ""-1""),
(if exists values ""PatchMinute"" of keys ""HKEY_LOCAL_MACHINE\SYSTEM\KREM"" of registry then value of it as string else ""-1""),
(if exists values ""RebootDayOffset"" of keys ""HKEY_LOCAL_MACHINE\SYSTEM\KREM"" of registry then value of it as string else ""-1""),
(if exists values ""RebootHour"" of keys ""HKEY_LOCAL_MACHINE\SYSTEM\KREM"" of registry then value of it as string else ""-1""),
(if exists values ""RebootMinute"" of keys ""HKEY_LOCAL_MACHINE\SYSTEM\KREM"" of registry then value of it as string else ""-1"")
) of bes computers";