Methods of programatically altering ipsec rules with C#?
问题 The only method I know how to execute IPsec changes involves calling netsh to do the changes. Is there a method using System.Management and WMI objects directly? If so, what is it? I am having a hard time finding relevant WMI information with MSDN. Or is there some other useful method someone out there has used? EDIT: I am working in C#, and would prefer C# examples with regard to .NET System.Management based answers. Thank you! 回答1: 1) Exact: WMI. The EnableIPFilterSec WMI class static