Vista / Server 2008: Enable or Disable Firewall from the Command Line

Home -> Windows -> Vista

2081 views

From the computer of: shamanstears (721 recipes)
Created: Jun 19, 2008     Updated: Jun 24, 2008


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

Instead of using the GUI, you can enable and disable the Windows Firewall from the command line. A must for any command line junkie.

You will need to use an elevated command prompt to do this.
1. Click the Start button.

2. Click All Programs and select Accessories.

3. Right-click Command Prompt and select Run as administrator.


To Enable the Windows Firewall, use the following:

netsh advfirewall set currentprofile state on




To Disable the Windows Firewall, use the following:

netsh advfirewall set currentprofile state off



After the command has been executed, the prompt will return an Ok when the Firewall has been enabled/disabled.

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  Vista: Enable or Disable Firewall
  Vista: Enable / Disable Hibernate Mode from the Command Line
  Vista: Enable / Disable Performance Options
  Vista: Enable or Disable Aero Glass Transparency Effect
  Vista: Enable and Disable Desktop Compositing
  Vista: Disable or Enable User Access Protection / Control (UAP or UAC)
  Vista: Disable DEP or NoExecute Protection to fix Explorer Crashing
  Automatic Defrag Disable and Enable in Vista
  Vista: Install or Enable the Telnet Client or Server
  Vista: Use BCDEDIT to change boot up options (dual boot w/XP Prof)

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.