I pass , string parameter to .ps script as an argument , but when the print value shows, when it passes as my file path it will not take. need some expert help to fix this.
# Main-function
function main($scriptName='test') {
#run test-suit
run-test-suit1
exit
}
# start run apache test plan
function run-test-suit1
{
#start to run test plan
New-Variable -Name 'scriptName' -Value $scriptName".bat"
Write-host "Start Run" $scriptName "test suit";
C:/workspace/D/Int_Module/$scriptName -NoNewWindow -Wait
}
main @args
test.bat
@ECHO OFF
echo Read and set host
set message=Load test name not Provided
echo %message%