Skip to content

CommunityHiQ/Frends.Community.PowerShell

Repository files navigation

Frends.Community.PowerShell

Actions Status MyGet License: MIT

Installing

You can install the task via FRENDS UI Task View or you can find the NuGet package from the following NuGet feed https://www.myget.org/F/frends-community/api/v3/index.json and in Gallery view in MyGet https://www.myget.org/feed/frends-community/package/nuget/Frends.Community.PowerShell

Tasks

PowerShell.RunCommand

Execute a single PowerShell command with parameters, the Task fails when a terminating error is encountered or an error is thrown

Input

Property Type Description Example
Command string The PowerShell command to execute New-TimeSpan
Parameters Array{Name: string, Value: object} Parameters for the command, provided switch parameters need to have a boolean value Name = Hours, Value = 1
LogInformationStream bool Whether information stream should be logged or not 'false'

Result

Property Type Description Example
Result Array{object}
Errors Array{string}
Log string

PowerShell.RunScript

Run a PowerShell script with parameters, the Task fails when a terminating error is encountered or an error is thrown

Input

Property Type Description Example
ReadFromFile bool Should the script be read from a file or from the Script parameter true
ScriptFilePath string Location for the script file F:\myScript.ps1
Script string The script to execute New-TimeSpan -Hours 1 | convertto-json
Parameters Array{Name: string, Value: object} Parameters for the script, provided switch parameters need to have a boolean value Name = Hours, Value = 1
LogInformationStream bool Whether information stream should be logged or not 'false'

Result

Property Type Description Example
Result Array{object}
Errors Array{string}
Log string

Building

Clone a copy of the repo

git clone https://github.com/CommunityHiQ/Frends.Community.PowerShell.git

Rebuild the project

dotnet build

Run Tests

dotnet test

Create a NuGet package

dotnet pack --configuration Release

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Change Log

Version Changes
1.0.0 First version
1.1.0 Multi-framework and Github actions support
1.2.0 Option to turn information stream logging on or off
1.3.0 Updated dependencies: Microsoft.CSharp to 4.7.0, PowerShellStandard.Library to 5.1.1, System.ComponentModel.Annotations to 5.0.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages