Firewall from the command line

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

If you want to set logging for a particular profile, use one of the following options instead of the “currentprofile” option:
Domainprofile
Privateprofile
Publicprofile

APPLIES TO
Windows Server 2008 Enterprise
Windows Server 2008 Datacenter
Windows Server 2008 Standard
Windows Server 2008 for Itanium-Based Systems
Windows Vista Ultimate
Windows Vista Ultimate 64-bit Edition
Windows Vista Enterprise
Windows Vista Enterprise 64-bit Edition
Windows Vista Business
Windows Vista Business 64-bit Edition
Windows Vista Home Premium
Windows Vista Home Premium 64-bit Edition
Windows Vista Home Basic
Windows Vista Home Basic 64-bit Edition

This entry was posted in Firewall. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *