I would like to analyze both the state and startup type for the known services on a Windows server. I know that this can be done with individual properties per service:
if ((start type of it) of service “A” = “auto”) and ((state of it) of service “A” = “Running”) then “Good” else “Bad”
Would also like to audit the current services on a Windows server against a pre-defined list of services. For example:
Server1 is has services A, B, C, and D
Server2 is has services A, B, C, and E
The pre-defined list of services that should be on the box is (A, B, C and F). It sure seems like this can be done, but struggling with how to write the relevance. Help!
This logic will tell you the subset of services that match a desired list. Once you have a list of “items that matched” it is not too much trouble to determine the items that are missing from the desired list.
Q: (display names of services) whose (exists (it, (“BES Client”; “DHCP Client”; “foo”)) whose (item 0 of it is item 1 of it))
A: BES Client
A: DHCP Client
Also, are you asking how to remove the desired list from being hard-coded in the Relevance?
no, I would actually like the desired list to remain in the relevance, so that we can update the desired list right in the analysis when we do happen to add/subtract a service from the baseline configuration.
If you have the Inventory and License site (I believe that’s where it lives), the Service Baseline Wizard will generate the relevance and remediation action for you.
Incidentally… that’s the first wizard I ever wrote
you can only subtract sets, where as right now you are doing: - elements of
Also, depending where you place parenthesis you will get various answers to the query above (after removing the ‘elements of’ bit). I’m not sure exactly the answer you’re looking for, but make sure you are specific with your parentheses.