TomLabs.PowerClam 1.0.0

Small library for executing powershell scripts.

Install-Package TomLabs.PowerClam -Version 1.0.0
dotnet add package TomLabs.PowerClam --version 1.0.0
<PackageReference Include="TomLabs.PowerClam" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TomLabs.PowerClam --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Requirements

You need to run following powershell command in order to use this library

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force

Usage

string output = ScriptRunner.RunScriptFile(new PSScipt(@"C:\PathToScript\Testscript.ps1"));
var script = new PSScipt(@"C:\PathToScript\Testscript.ps1");
script.Parameters[0].Value = "test";
string output = ScriptRunner.RunScriptFile(script);

Requirements

You need to run following powershell command in order to use this library

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force

Usage

string output = ScriptRunner.RunScriptFile(new PSScipt(@"C:\PathToScript\Testscript.ps1"));
var script = new PSScipt(@"C:\PathToScript\Testscript.ps1");
script.Parameters[0].Value = "test";
string output = ScriptRunner.RunScriptFile(script);

Release Notes

First release

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.0.0 267 11/5/2017