Using netsh to enable/disable Windows firewall

user-pic
Vote 0 Votes

netsh firewall set opmode enable
netsh firewall set opmode disable

2014-12-04 Update:
上面是 for Windows XP
較新的 Windows 使用
netsh advfirewall set currentprofile state on
netsh advfirewall set currentprofile state off

ref. 如何使用 「 netsh advfirewall 防火牆 」 內容,而不是控制項在 Windows Server 2008 中,並在 Windows Vista 中的 Windows 防火牆行為的 「 netsh 防火牆 」 內容

About this Entry

This page contains a single entry by Pank published on January 25, 2011 5:37 PM.

Unix Utilities Collection for Win32 2.0 was the previous entry in this blog.

PHP clear terminal screen is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives