Requirements
1) need to run PowerShell from QB
2) need to pass variable from QB to PowerShell path
3) need to configure PS variables to pass in QB
Example:
QB Variable selected from component menu = ${vars.getValue("destdir")}
PS variables needed = $source, $destination (perhaps groovy can handle this ? or not )
actual PS command that needs to be executed =
PS > $source = "D:\Build\C\LPlus\Builds\trunk\Continuous\LPlus\scratch\dist\lplus.war";
$destination = "\server1\it_cm\LPlus-Ref\${vars.getValue("destdir")}\scratch\dist\lplus.war"
PS > New-Item -ItemType File -Path $destination -Force
PS > Copy-item $source $destination -Recurse
perhaps the mix of PS variables and QB variable is not possible ? the PS source and destination variables will change but the QB variable will not.
Essentially the above PS commands will be repeated 8 or more times.
Note: destination path does not exist , the PS script will create the path with sub directories and copy the needed file only without populating the sub directories with files contained in the source. the above PS commands work perfectly from the PS command line. The commands my need to be in a PS script.