Thursday, December 25, 2008

Modify a Firewall Property

Demonstration script that modifies Windows Firewall properties for the current profile

Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
objPolicy.ExceptionsNotAllowed = TRUE
objPolicy.NotificationsDisabled = TRUE
objPolicy.UnicastResponsestoMulticastBroadcastDisabled = TRUE

This is a VB Script, this can be used by saving the file in .vbs file