- The SDK requires PowerShell 3 or higher.
- The SDK is designed for use with PowerShell.exe (Console Host).
- A TFS 2015 Update 2 Windows agent (or higher) is required to run a PowerShell3 task end-to-end. However, an agent is not required for interactively testing the task.
Save-Module -Name VstsTaskSdk -Path .\
or install a specific version:
Save-Module -Name VstsTaskSdk -Path .\ -RequiredVersion 0.7.0
Use the PowerShell3
execution handler and set the target to the entry PS1 script. The entry PS1 script should be located in the root of the task folder.
{
"execution": {
"PowerShell3": {
"target": "MyTask.ps1"
},
}
}
The SDK should be packaged with the task in a ps_modules
folder. The ps_modules
folder should be in the root of the task folder.
Example layout: Consider the following layout where MyTask
is the root folder for the task.
MyTask
| MyTask.ps1
│ task.json
└───ps_modules
└───VstsTaskSdk
[...]
VstsTaskSdk.psd1