0

I have installed the Azure powershell cmdlet's via the web platform installer on my build server that is running TeamCity. However, when I setup a powershell build step I get an error:

[19:16:00][Step 2/2] Publish-AzureWebsiteProject : The term 'Publish-AzureWebsiteProject' is not [19:16:00][Step 2/2] recognized as the name of a cmdlet, function, script file, or operable [19:16:00][Step 2/2] program. Check the spelling of the name, or if a path was included, verify [19:16:00][Step 2/2] that the path is correct and try again.

The command works for me when I log onto the server, and the team city build agent is running under my user account. So I have no idea what's going on!

  • Not familiar with TeamCity (just Powershell), but you may need to import the module first? – Davidw Jun 26 '14 at 20:24
  • How do you do that? – jcvandan Jun 26 '14 at 20:41
  • import-module modulename – Davidw Jun 26 '14 at 21:10
  • add Import-Module azure at the top of your script(s) – Raf Jun 27 '14 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.