Every so often, someone gives me a list of ip addresses or user names and wants to know which user names or computer names they are on. I know i could create a computer report and then filter it with the IP addresses or user names i require but picking out 10 IPs (or user names) out of 6000 is a bit of a pain.
What i’d like to do is have a report(s) with a textarea field where I could copy the list of IPs and it would give me the informations i need for those IPs. alternatively, the session relevance for it would be good too.
I was wondering if you could do something like
(name of it, values of results(it, bes property “User Name”)) of bes computers whose (value of results(it, bes property “IP Address”) is in (“10.1.1.23”, “172.16.43.4”))
Yep… You were close, but since you are iterating through two lists (one list of computers and then the list of IP address per computer), you need to use two whose clauses… Here is the relevance you need:
(name of it, values of results(it, bes property “User Name”)) of bes computers whose (exists value whose (it = “192.168.0.11” OR it = “192.168.0.100”) of results(it, bes property “IP Address”))
Or… if you want to get tricky and make it easier to build the list, this is an equivalent expression:
(name of it, values of results(it, bes property “User Name”)) of bes computers whose (exists value whose (";192.168.0.11;192.168.0.100;" contains “;”&it&";") of results(it, bes property “IP Address”))
Now you can put this in a Custom Report and use javascript to make a text box to look up the info… It will look like this:
var ipaddress = <use javascript to get the values from the html text area with semicolons before/after ips>;
var computerinfo = EvaluateRelevance(‘name of it, values of results(it, bes property “User Name”)) of bes computers whose (exists value whose ("’ + ipaddresses +’" contains “;”& it &";") of results(it, bes property “IP Address”))’;