Foster
Foster

Reputation: 756

Jenkins build fails when executing shell

I am trying to run a powershell script called filemove.ps1 through Jenkins. I have put the path to the file in the Execute Shell section like this

powershell.exe -file "\BUILD\AutomatedDelivery\FileMove\FileMove.ps1"

Which is the location of the file on the network. Do I need to call something in order to make this run? As of now, I am getting a failed build with the error,

"line 2: powershell.exe command not found Build step 'Execute shell' marked build as failure"

Any help would be appreciated.

Upvotes: 2

Views: 910

Answers (1)

FrozenSoul
FrozenSoul

Reputation: 131

if Build is the name of the server, you need double backslash \\ before it. if its not, you need to put the server\share

Upvotes: 1

Related Questions