Share via

Need command to fetch data in human readable format from secpol.msc(local security policy). For e.g. windows defender firewall with advanced security values in command prompt

Ranjeet Yadav 1 Reputation point
2022-08-17T08:00:25.067+00:00

• We are working on Windows OS hardening as per CIS Benchmark rules.
• We are using Windows server 2019 AWS EC2 Instance.
• We want to fetch the data of windows defender firewall with advanced security of local security policy(secpol.msc).
• We tried using the below command to fetch the data in command prompt:

  1. netsh advfirewall show allprofiles
  2. netsh advfirewall consec show rule name=all
    231995-firewallsnippet.png

• We have configured windows defender firewall with the help of ansible and trying to fetch values in command prompt.
• But in command prompt we are unable to fetch any latest changed data as we tried changing values in windows defender firewall with advanced security.

• Can you please help us with the command that can be used to fetch data in human readable format from advance security section of windows defender firewall (local security policy - secpol.msc).

Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
Windows for business | Windows Server | User experience | Other
Windows for business | Windows Server | Devices and deployment | Configure application groups
0 comments No comments

1 answer

Sort by: Most helpful
  1. MotoX80 37,696 Reputation points
    2022-08-18T11:39:22.4+00:00

    Try this command.

    netsh advfirewall firewall show rule name=all  
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.