• 2 replies
  • Latest Post - ‏2014-05-11T18:49:13Z by jgstew
16 Posts

Pinned topic Get Firewall monitor status

‏2014-04-21T20:20:45Z | "network firewall profile"

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?


  • BrianPGreen
    66 Posts

    Re: Get Firewall monitor status


    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.

  • jgstew
    410 Posts

    Re: Get Firewall monitor status



    I couldn't find any Relevance Inspectors to detect the network profile here:


    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.