Take a look at these links. Good for reference and commands examples. This is what I use for most of my firewall changes from command line scripts.http://technet.microsoft.com/en-us/libr ... 10%29.aspxhttp://support.microsoft.com/kb/947709
netsh is your friend. Just be careful with it. Some items can be detrimental to your network connectivity.
One I have found super useful is blowing away the IP Stack on machines that have been infected with malicious content.This tends to help with any items that may have hooks into the network adapters.i.e. netsh int ip reset /L c:\resetip.log
That may cause a reboot prompt and could potentially cause connectivity issues. Another one I use from time to time is this one....i.e netsh int ip set address "Local Area Connection" dhcp
Now all you have to do is create shell scripts or commands and you are good to go for running immediately or scheduling.