I put together an analysis that parses several properties from some files. At first I was getting “Singular expression refers to nonexistent object”. In searching many excellent threads on this subject, changing the output to be a plural rather than singular appeared to be the answer.
I adapted my analysis properties to all have plural string output based on testing in Debugger on a reference machine of the group that I’m targeting. Now about 2/3 of the targeted machines correctly report the desired results while the remaining 1/3 still report “Singular expression refers to nonexistent object”. Ironically, if I RDP into one of the machines reporting that error in the analysis, it will report correctly in Debugger locally on that computer. I don’t understand that part.
Here is one of the properties. The others are similar if-then-else statements.
q: if exists locked lines whose (it contains "Failed to connect" | "FTC") of file "c:\temp\somefile.txt" then "Failed to connect" else substrings before "." of substrings after "SSL " of locked lines whose (it contains "SSL certificate" | "ssl") of file "c:\temp\somefile.txt"
A: certificate verify ok
T: 1.985 ms
I: plural string
I understand getting the ‘Singular Expression’ error when it really is a singular output, but I’m not understanding how it can still give that error when the properties of the analysis are all plural strings.