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
Execute a single PowerShell command with parameters, the Task fails when a terminating error is encountered or an error is thrown
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' |
Property | Type | Description | Example |
---|---|---|---|
Result | Array{object} | ||
Errors | Array{string} | ||
Log | string |
Run a PowerShell script with parameters, the Task fails when a terminating error is encountered or an error is thrown
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' |
Property | Type | Description | Example |
---|---|---|---|
Result | Array{object} | ||
Errors | Array{string} | ||
Log | string |
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
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.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- 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!
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 |