System Tools and Scripting Plugins → MS Windows PowerShell Plugin → Run a PowerShell Script Step
This step executes a PowerShell script.
You can pass two user-provided parameters to the script, the path to inputPropFile and the path to outputPropFile. This enables the script to read and write values to those files that can be used later on, for example in next process step.
In the following example, the PowerShell plugin gets the first three lines from inputPropsFile and writes them to outputPropFile using the parameters args and args.
#get 3 lines from inputPropsFile# $InputProps = get-content $($args) | select -first 3 Write-Host "InputProps" $InputProps
#set 3 lines from outputPropsFile# set-content $($args) $InputProps $OutputProps = get-content $($args)
Write-Host "OutputProps" $OutputProps
|Script||Enter the script code to execute. A Java properties file for output properties to upload to the server can be accessed using args and another containing all the input properties can be accessed using args.|
|PowerShell Command Path||The absolute path to the PowerShell executable. Leave it blank if it's on the path.|
Optional properties: None
Copyright © 2013–2019 Micro Focus or one of its affiliates. All rights reserved.