GSEC · Question #299
Which of the following utilities can be used to manage the Windows Firewall (WF) from the command line?
The correct answer is C. netsh.exe. The netsh (Network Shell) utility includes the 'advfirewall' context, which allows full command-line management of Windows Firewall rules, profiles, and settings.
Question
Which of the following utilities can be used to manage the Windows Firewall (WF) from the command line?
Options
- Asecedit.exe
- Bsc.exe
- Cnetsh.exe
- Dnet.exe
How the community answered
(26 responses)- A8% (2)
- B12% (3)
- C77% (20)
- D4% (1)
Why each option
The netsh (Network Shell) utility includes the 'advfirewall' context, which allows full command-line management of Windows Firewall rules, profiles, and settings.
secedit.exe is used to analyze and configure security policies defined in security templates and does not manage Windows Firewall rules.
sc.exe is the Service Control utility for starting, stopping, and querying Windows services and has no firewall rule management capability.
netsh.exe provides the 'netsh advfirewall' context specifically designed to create, modify, delete, and query Windows Firewall with Advanced Security rules from the command line. It supports configuring inbound and outbound rules, firewall profiles (domain, private, public), and logging settings without requiring the GUI console.
net.exe manages network shares, user accounts, and legacy services but cannot create or modify Windows Firewall rules.
Concept tested: Windows Firewall command-line management with netsh
Source: https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-contexts
Topics
Community Discussion
No community discussion yet for this question.