Como carregar o PowerShell Module a partir de script personalizado no vNext build agent?

Estou usando a etapa de compilação padrão do TFS vNext para executar um script do PowerShell. Dentro do script, estou tentando tirar proveito de algumas das funções nos módulos padrão do TFS Agent.

Listado aqui:http://blog.majcica.com/2015/11/14/available-modules-for-tfs-2015-build-tasks/

Vi as duas linhas a seguir em muitos scripts do PowerShell encontrados nas etapas de criação:

Import-Module "Microsoft.TeamFoundation.DistributedTask.Task.Internal"
Import-Module "Microsoft.TeamFoundation.DistributedTask.Task.Common"

Eu tentei usar as mesmas linhas no meu script, no entanto, recebo o erro:

VERBOSE: Loading module from path 
'C:\TFS2015-Agent\Agent1\agent\agent\worker\Modules\Microsoft.TeamFoundation.DistributedTask.Task.Common\Microsoft.TeamFoundation.DistributedTask.Task.Common.dll'.
Import-Module : Could not load file or assembly 'Microsoft.TeamFoundation.DistributedTask.Agent.Interfaces, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 
The system cannot find the file specified.
At C:\tfsVnBw1\3\s\Configuration\BuildScripts\CommonFunctions.ps1:25 char:5
+ Import-Module "Microsoft.TeamFoundation.DistributedTask.Task.Common" - Error ... + CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

Se eu tentar não importar, ele escreverá algo como:

The 'Find-Files' command was found in the module 'Microsoft.TeamFoundation.DistributedTask.Task.Common', 
but the module could not be loaded. For more information, run 'Import-Module Microsoft.TeamFoundation.DistributedTask.Task.Common'. 
At C:\tfsVnBw1\3\s\Configuration\BuildScripts\CommonFunctions.ps1:71 char:16
+ $files = @(FindFiles $filePattern)
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Find-Files:String) [FindFiles], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Não é possível usar os módulos dos scripts do PowerShell 'normais' e não apenas dos scripts do PowerShell registrados como uma etapa de compilação real?

questionAnswers(2)

yourAnswerToTheQuestion