Roshan N
Roshan N

Reputation: 1053

How to run the Powershell File which Located in remoted Server using rundeck

I Need to Execute the Power shell file which located in the remote Machine using rundeck.

So far I have done this:

  1. Create a Node with the server AS123
  2. Created a New Job Under the Projects.
  3. In the Job Workflow I have chosen Add a Step -> Script file or URL and did the below Setup.

enter image description here

This setup is searching for the Powershell file path in the rundeck server rather than the remote host server AS123.

Can anyone share the steps How to call the powershell which is hosted in remote Server and Execute the same on the remote host.

Upvotes: 1

Views: 1048

Answers (1)

Maayana
Maayana

Reputation: 76

use one of the following instead. Personally I prefer using the inline script cause it more flexible.

enter image description here

use the exact command line you use when running the script locally on your server via cygwin (I presume). i.e

powershell.exe 'd:\scripts\test\fun-test.ps1' -path Testing

Make sure to select dispatch to nodes and filter your relevant server.

enter image description here

When using 'script file or URL' it should be a path rundeck can access cause it runs locally on the rundeck server.

Upvotes: 1

Related Questions