Home  >  Article  >  System Tutorial  >  Turn Windows Firewall on or off using the command line

Turn Windows Firewall on or off using the command line

王林
王林forward
2024-01-02 19:24:072003browse

When we use computers to turn off the firewall, many friends think that the steps are too troublesome. So the easiest way is to use commands to turn on or off the firewall. Today I will teach you detailed commands to organize your computer quickly and conveniently. Let’s take a look at the specific tutorial below.

Detailed commands for turning on/off Windows Firewall

1. Open Run and enter cmd.

Turn Windows Firewall on or off using the command line

2. Directly execute the command:

Turn Windows Firewall on or off using the command line

NetSh Advfirewall set allprofiles state on //Open the firewall

NetSh Advfirewall set allprofiles state off //Turn off the firewall

Start the firewall:

Turn Windows Firewall on or off using the command line

Restore the default firewall policy:

Turn Windows Firewall on or off using the command line

To view more information, run the following command:

netsh advfirewall reset?

The above is the detailed content of Turn Windows Firewall on or off using the command line. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:somode.com. If there is any infringement, please contact admin@php.cn delete