简体   繁体   中英

Run Powershell script on TFS server for publish to Azure

I try to configure TFS for Continuous Delivery to Azure by this article In article TFS published package to Azure with Powershell script. When build starts I get errors like ObjectNotFound: (Set-AzureDeployment:String) [], CommandNotFoundException . Looks like I didn't install Azure cmdlets, but I install all from Web Platform Installer. And when I try to run script locally on server - it works and deploys package.

In article Powershell starts by adding InvokeProcess to template with Filename="PowerShell" .

I think I just don't run Powreshell correctly. Maybe somebody has some ideas which command should I use?

Find a solution

Powershell cann't find Azure module. Add this before Import-Module Azure command in script

$env:PSModulePath=$env:PSModulePath+";"+"C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell"

Could be that you installed the cmdlets on the user profile. Try re-install after logging in with the account running the build service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM