TFS Custom Extension Powershell script Parameters are not working inside a powershell Invoke script.
I’ve a TFS Custom Extension which I’m developing, which has a invoke powershell script and the extension runs this script and it call
powershell script inside the Invoke powershell script
Script1
Invoke-TFS.ps1 (TFS Agent executes the invoke script) works as expected
sample code:
invoke-TFS.ps1 has a if statements which executes the customScript.ps1 works fine except the TFS Variables are not working for the customScript.ps1 from TFS Agent.
if($script -eq customScript.ps1)
{
Write-Host "CustomScript Executed"
}
else
{
Write-Host "CustomScript is not Executed"
}
Script2
The customScript.ps1
Sample code:
param($path, $path1)
The Path and Path1 variables are passed through TFS Variables, The customScript.ps1 gets executed with all the debug statements added expect the arguments that are passed from the TFS Variables.
Please suggest to resolve the TFS Variables.