Get Firewall monitor status

(imported topic written by netmeister91)

We have a problem where the network location profile unexpectedly changes from Domain to Public. This jazzes up some client web apps.

To remedy this we bounce the "Network Location Awareness"service.

To identify servers with the problem we run:

netsh advfirewall monitor show current profile

If the return contains the string “Unidentified network” then the correct network profile is not present…

I could code up something that runs once a day and sends the results of the netsh call to a text file and then parse the file but would like to have relevance do the interogating.

How can I interrogate the firewall in relevance to return true if "Undefined network is the network profile?

(imported comment written by BrianPGreen)

You’d need relevance along with something else to do that. Relevance by itself can’t call into external tools because it can’t do anything to change the state of the machine.

The typical way to solve this is to create an action to periodically run that command and put the result into a text file (or something) and then have relevance that looks at the file.

(imported comment written by jgstew)

I couldn’t find any Relevance Inspectors to detect the network profile here:
http://support.bigfix.com/inspectors/Networking%20Objects_Any.html

I would recommend filing an RFE for this, as it would be helpful to have added.

I would bet that the network profile could be queried through Relevance directly using the WMI inspector if that information can be found somewhere in WMI, otherwise the only option seems to be to run the command periodically with a task and then query the results with relevance… which I agree is not ideal.