dotnet add package SharpNetSH.Dev --version 2.0.5-dawidcieszynski-firewall-201905032016
NuGet\Install-Package SharpNetSH.Dev -Version 2.0.5-dawidcieszynski-firewall-201905032016
<PackageReference Include="SharpNetSH.Dev" Version="2.0.5-dawidcieszynski-firewall-201905032016" />
paket add SharpNetSH.Dev --version 2.0.5-dawidcieszynski-firewall-201905032016
#r "nuget: SharpNetSH.Dev, 2.0.5-dawidcieszynski-firewall-201905032016"
// Install SharpNetSH.Dev as a Cake Addin
// Install SharpNetSH.Dev as a Cake Tool
A simple netsh library for C#
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.
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:
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
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());
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
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.
|Versions Compatible and additional computed target framework versions.
|net35 is compatible. net40 was computed. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed.
- No dependencies.
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.