I want be able to programmatically enable, disable, create firewall rules in Windows Server 2008 R2. What is the object model to modify the firewall rules from .Net/PowerShell?
A:
There is probably a WMI set of classes for this but I wanted to point out that you can use the existing command line utility netsh.exe from PowerShell. Execute:
netsh firewall /?
To see its options.
Keith Hill
2010-02-09 23:15:25
Nope, I've never seen a WMI API, but I've been wrong (many) times before.
Marco Shaw
2010-02-10 01:14:59
Wow and I thought WMI supported everything including the kitchen sink. :-)
Keith Hill
2010-02-10 06:19:28