Does Windows Management Instrumentation (WMI) provide a way to access Internet Connection Sharing (ICS) and Internet Connection Firewall (ICF) configuration settings?
As far as I know, WMI doesn't provide access to ICS and ICF settings. However, you can use the scripting objects in the Home Networking Configuration Manager component (hnetcfg.dll) to retrieve and manage ICS and ICF settings. The ICS and ICF software development kit (SDK) includes several sample scripts. See the "Using Internet Connection Sharing and Internet Connection Firewall" Web page (http://msdn.microsoft.com/library/en-us/ics/ics/using_internet_connection_sharing_and_internet_connection_firewall.asp).