Noob relevance question

Hi All!

I am having trouble figuring out how to create this relevance, what I am trying to accomplish is to make sure a windows service called RPC Locator is disabled unless IIS is running on a particular server. This is what I have so far:

not exists 1 whose ((item 0 of it or item 1 of it) of ((not exist services whose (service name of it as lowercase = “RpcLocator” as lowercase)), (conjunction of (start type of it = “disabled”) of services whose (service name of it as lowercase = “RpcLocator” as lowercase))))

If anyone could help that would be great, thanks.

If I’m understanding the request correctly then the following should do it for you (depending on what the name of the IIS service is)

if ( "disabled" != start type of service "RpcLocator" ) then ( running of service "IIS" ) else false

For fixlet relevance you don’t need to worry as much if the service isn’t present as an “error” is the same as false, so if service RpcLocator doesn’t exist your condition is valid, and the same is true of IIS. This will only be relevant/true if RpcLocator is present and not disabled, and IIS is present and running

This should be computer that are compliant:

( exists services "RpcLocator" whose( ("disabled" != start type of it) AND (running of services "IIS")) ) OR ( not exists services "RpcLocator" whose("disabled" != start type of it) )

This should be computers that are not compliant:

( exists services "RpcLocator" whose( ("disabled" != start type of it) AND (not running of services "IIS")) )

Thank you both, this was a big help.