In Linux, you can use iptables to store/load your iptables based firewall configuration, but in Windows it appears to me that it's all GUI based, which means you can't store / track the changes you've made to it.
So, does Windows have an equivalent text-based firewall configuration, one in which you can export it, modify it and reload it?