Is it possible to run commands in order to get output necessary for relevance checking?
For instance, I am trying to determine if a system has the proper routes installed already. In order to do that however, I need to first get the contents of the ‘route print’ command into a file, so the relevance language can check the file for certain strings.
I don’t see how I can include that as part of my fixlet - I know I can include relevance language as part of my actions, but not vice versa.
You can’t embed actions in relevance (this is specifically not allowed because it would violate the premise of the relevance language that it is a “query-only” language and can’t change anything).
You will need to run an action to write the route results to a file and then have a Fixlet/property inspect the file… Here is an example of how this is done:
For some reason, I cannot figure out how to output a relevance query to a text file. I’m trying to use Action Script to output “sids of members of local group “Administrators”” to a text file and have the results one per line, so I can later perform a query on each member of that group.
delete __createfile
createfile until ___EOF___
{concatenation "%0a%0d" of ((sids of members of local group "Administrators") as string)}
___EOF___
move __createfile "C:\pathname\file.txt"
Replace “C:\pathname\file.txt” with appropriated pathname