$strString = "file=myfile"
write-host $strStringparam (
[string]$server = "default-data"
)
write-output $server<joblist>
<job>
<defaultTab>summary</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>fbeacd6f-929f-41f8-a151-89e449457a49</id>
<loglevel>INFO</loglevel>
<name>JobExample</name>
<nodeFilterEditable>false</nodeFilterEditable>
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<exec>echo "starting..."</exec>
</command>
<command>
<fileExtension>ps1</fileExtension>
<plugins>
<LogFilter type='key-value-data'>
<config>
<logData>true</logData>
<name>str</name>
<regex>.*file=(.*).*</regex>
</config>
</LogFilter>
</plugins>
<scriptargs />
<scriptfile>C:\rundeck\projects\ProjectPOWERSHELL/script1.ps1</scriptfile>
<scriptinterpreter>powershell.exe</scriptinterpreter>
</command>
<command>
<fileExtension>ps1</fileExtension>
<scriptargs>${data.str}</scriptargs>
<scriptfile>C:\rundeck\projects\ProjectPOWERSHELL\script2.ps1</scriptfile>
<scriptinterpreter>powershell.exe</scriptinterpreter>
</command>
</sequence>
<uuid>fbeacd6f-929f-41f8-a151-89e449457a49</uuid>
</job>
</joblist>