I am trying to programmatically create an Outbound Windows firewall rule. In addition, I'd like to programmatically enable and disable this rule. How can I go about doing this in C#? Manually, I can do this by going into control panel, clicking on Windows Firewall, then clicking advanced settings.
You could wrap the netsh advfirewall command syntax into a small library to allow you to enable/disable settings on demand. Failing that, see http://msdn.microsoft.com/en-us/library/windows/desktop/ff956124(v=vs.85).aspx for the Windows Firewall with Advanced Security API.