简体   繁体   中英

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.

在此处输入图片说明

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.

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

在此处输入图片说明

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

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

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

在此处输入图片说明

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

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