cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Cisco Community Designated VIP Class of 2020

1849
Views
0
Helpful
21
Replies
Beginner

Newbie Question - Can Tidal execute a remote PowerShell script or BAT file?

My first post.  I am new to Tidal but I have had experience with other schedulers.

I have a PowerShell script that needs to be executed on a remote computer.  All of the software that the script needs is installed on that computer.

Additionally, I need the script to run under a service account.  Is this possible and if so, how do I go about it?

This job will be manually kicked off each time it is needed.

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Sure. There are a few screen

Sure. There are a few screen shots. One of a variable I used for the folder location on the Tidal server (not necessary but I use a lot of scripts). One for the Tidal command itself. The last is the script to remotely run the windows job. Let me know if these don't make sense.

View solution in original post

21 REPLIES 21

Hi Brian, Please see if this

Hi Brian, Please see if this post helps you

https://supportforums.cisco.com/document/12406511/calling-powershell-scripts-tidal

Beginner

Thank you, Dinesh, but that

Thank you, Dinesh, but that does not run the script on the remote computer.

Does it allow me to do something like \\applicationServer.InternalNetwork.net\powershell.exe on the command text box?

Enthusiast

Hi Bryanshaw46, On the remote

Hi Bryanshaw46,

 

On the remote server you would have to login into PowerShell as Administrator, and Enable-PSRemoting -Force. The below article below explains more

http://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/

 

BR,

Derrick Au

Beginner

How may I supposed to do that

How may I supposed to do that using Tidal Scheduler?

Beginner

You are kinda trying to

You are kinda trying to bypass the licensing design by not having an agent on the remote server.

 

Having said that have you looked at something like rexec for windows?

 

 

Highlighted
Beginner

Hi BryanI believe there are

Hi Bryan

You could look at using PSSession and Invoke-Command within your powershell script as per this article: https://technet.microsoft.com/en-us/library/dd819505.aspx

 

 - Paul

Beginner

Maybe I am not stating my

Maybe I am not stating my question clearly enough.  I need a Tidal Scheduler job that will execute a PowerShell script on a remote computer.  How do I do that?

My Tidal Scheduler runs on one server.  The script and all of the software needed to run it are on another server.

Paul, thank you for taking the time to answer, but I honestly do not see how your answer is going to help me.  I am new to Tidal.

Maybe I am overlooking something...

I am assuming you have a

I am assuming you have a windows agent running on the other server where PS script is. Once the agent is installed on the other server then make the job to run on that agent.

Then you could run it as c:\powershell.path\powershell.exe instead of \\applicationServer.InternalNetwork.net\powershell.exe

Beginner

No, we do not have a windows

No, we do not have a windows agent installed on the remote server.  Is that necessary?

Yes. PowerShell security

Yes. PowerShell security controls probably wont let you to invoke script from external server.

Can you try with the agent installed on the second server ?

Beginner

This would be a last resort

This would be a last resort because of licensing.  I would try to install all of the required software on the existing agent machine that my powershell script requires first.

Beginner

Use UNC path \\server\path

Use UNC path \\server\path\file.bat only issue it will exit after exe bat file and you will not get a bad return code if fails and no output. Not the best way but will work as log as account running agent has exec rights to bat file. I would bite the bullet and put agent on box. Unless this is the only job you will run.

Beginner

Hmmm, I was hoping that Tidal

Hmmm, I was hoping that Tidal was a modern scheduler and would run a remote script.  This would be a last resort because of licensing.  I would try to install all of the required software on the existing agent machine that my powershell script requires first.

I would set up a windows

I would set up a windows scheduled job on your remote server that runs the powershell script. Then create bat script on your Tidal server that kicks off that remote windows scheduled job, which you can then add as a job in Tidal. I have this set up for a job of mine just running a remote bat script and not a powershell script.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here
This widget could not be displayed.