Using INetFwOpenPorts ports to open FireWall Ports
Hello,
I was hopeing for some assistance with my topic. I am attempting to develop a Console Application using C# that will open
around 13 Ports on Multiple Windows 2008 Servers. I came across this link http://blogs.msdn.com/b/securitytool...gs-with-c.aspx on MSDN which helps describe the process.
Was wondering if anyone had any more examples or sample code I could view.
I see I need to:
INetFwOpenPort port;
Port.port = "PortNumber";
Port.Name = "PortName";
Port.enabled = True;
// Then add the GloballyOpen Ports Collection
ports.Add(port);
Now since I have 13 ports that needs to be opened, was wondering what the best method of coding this port names and Numbers would be? Possible place the names and numbers in an array and call THEN add them using a Loop.
Again, any insight would be helpful.
Thank You!
Re: Using INetFwOpenPorts ports to open FireWall Ports
Powershell could be used to do that, pretty easily.
Re: Using INetFwOpenPorts ports to open FireWall Ports
Really. So you think it would be more efficient going the scripting route.
Yeah I have not used PowerShell yet, only VBScripting.
So this is why I chose to go the C# Console route.
If you have any examples, I would be happy to check them out.
Thank You.
Re: Using INetFwOpenPorts ports to open FireWall Ports