Reputation: 537
I am working on vNext builds TFS 2015. How can we pass a user defined variable from vNext build to power shell script? I am adding powershell script as a step in the build definition.
Upvotes: 8
Views: 5248
Reputation: 11
You Can access the V next user variables in power shell like below,
Example:
$env:foo
In your case it is,
blah.ps1 -foo $env:foo
Upvotes: 1
Reputation: 22235
You can define build variables, then reference them in the PowerShell task under arguments. For example if my powershell script took a parameter called foo I could do this:
Upvotes: 15