I have a very simple script that spits out environment variables like this:
Write-Host "SYSTEM_TEAMPROJECT: $ENV:SYSTEM_TEAMPROJECT"
My build has one step - the PowerShell task. The script filename task is set to the script path in TFSVC, for example. $ / Home / BuildProcessTemplates / AllProps.ps1.
When I queue a new assembly, it does not report the following error: The term "C: \ Builds \ agent_work \ cb535ea3 \ Main" is not recognized as the name of the cmdlet, function, script file or healthy Check the spelling of the name or specify the path, make sure that the path is correct and try again. "
Did I configure the task incorrectly?
- UPDATE: here is a copy of powershell task

source
share