SharpNetSH.Dev 2.0.5-dawidcieszynski-firewall-201905032016

netsh mamanger

This is a prerelease version of SharpNetSH.Dev.
Install-Package SharpNetSH.Dev -Version 2.0.5-dawidcieszynski-firewall-201905032016
dotnet add package SharpNetSH.Dev --version 2.0.5-dawidcieszynski-firewall-201905032016
<PackageReference Include="SharpNetSH.Dev" Version="2.0.5-dawidcieszynski-firewall-201905032016" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharpNetSH.Dev --version 2.0.5-dawidcieszynski-firewall-201905032016
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

SharpNetSH

A simple netsh library for C#

NuGet Installation:
Install-Package SharpNetSH

This library is designed to provide easy access to the NetSH tool from inside of your C# application. Currently the library only supports some NetSH contexts, but other contexts will be added in to support the remainder of the functionality as time permits. See the Current NetSH Context Support section for information on what is supported currently.

##Usage

The library utilizes a fluent API that mimics the structure of command line netsh calls.

For example - given the following command line:

netsh http show sslcert ipport=0.0.0.0:1234

You would write the following:

NetSH.CMD.Http.Show.SSLCert("0.0.0.0:1234");

All objects respond with a StandardResponse object which denotes the exit code, whether or not it was a normal exit condition, the raw data that was returned, and a dynamic object that was parsed with a standardized output parser - See the Preface for more information as to why it is standardized

The NetSH.CMD command instantiates a new instance of the default NetSH object, utilizing the CommandLineHarness for execution. Execution harnesses are what take a NetSH command and do something with them. If you wish to use a different execution harness, simply instantiate the NetSH object directly:

var netsh = new NetSH(new CommandLineHarness());
netsh.Http.Show.SSLCert("0.0.0.0:1234");

If you wish to write your own execution harness simply implement the Ignite.SharpNetSH.IExecutionHarness interface. We also provide a ConsoleLogHarness which simply directs your command output to Console.WriteLine calls.

We have commented each method call with text directly from its MSDN counterpart, along with links to the original MSDN source pages. As such, to explore the various contexts and actions, simply check out your type ahead for detailed information.

SharpNetSH

A simple netsh library for C#

NuGet Installation:
Install-Package SharpNetSH

This library is designed to provide easy access to the NetSH tool from inside of your C# application. Currently the library only supports some NetSH contexts, but other contexts will be added in to support the remainder of the functionality as time permits. See the Current NetSH Context Support section for information on what is supported currently.

##Usage

The library utilizes a fluent API that mimics the structure of command line netsh calls.

For example - given the following command line:

netsh http show sslcert ipport=0.0.0.0:1234

You would write the following:

NetSH.CMD.Http.Show.SSLCert("0.0.0.0:1234");

All objects respond with a StandardResponse object which denotes the exit code, whether or not it was a normal exit condition, the raw data that was returned, and a dynamic object that was parsed with a standardized output parser - See the Preface for more information as to why it is standardized

The NetSH.CMD command instantiates a new instance of the default NetSH object, utilizing the CommandLineHarness for execution. Execution harnesses are what take a NetSH command and do something with them. If you wish to use a different execution harness, simply instantiate the NetSH object directly:

var netsh = new NetSH(new CommandLineHarness());
netsh.Http.Show.SSLCert("0.0.0.0:1234");

If you wish to write your own execution harness simply implement the Ignite.SharpNetSH.IExecutionHarness interface. We also provide a ConsoleLogHarness which simply directs your command output to Console.WriteLine calls.

We have commented each method call with text directly from its MSDN counterpart, along with links to the original MSDN source pages. As such, to explore the various contexts and actions, simply check out your type ahead for detailed information.

  • .NETFramework 3.5

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.5-dawidcieszynski-firew... 106 5/3/2019
2.0.5-dawidcieszynski-20190503 105 5/3/2019