Executing a Remote Bat File from A Remote Server
NickName:HMAN322 Ask DateTime:2016-07-14T02:35:08

Executing a Remote Bat File from A Remote Server

Want to do something like this but only returns the string of the scriptblock and no output. How would I get this bat file to execute and produce the desired output csv file?

Invoke-Command -Computer server1 -ScriptBlock {"\\server2\shared\Compliance\K3\K3 Rec Tool\LimitsRecon\test.bat"}

Copyright Notice:Content Author:「HMAN322」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38359331/executing-a-remote-bat-file-from-a-remote-server

More about “Executing a Remote Bat File from A Remote Server” related questions

Executing remote bat located on the remote computer

I need to execute a bat file located on several remote computers from my administration computer. When I run it on the different remote computers I have no problem executing it. When i run a "call

Show Detail

How to execute a bat file on remote server?

I have two physical machine. The first machine want to execute a bat file on the second machine. I create a share location on the second server and tried to run it from the first machine and it doe...

Show Detail

How to execute .bat file in PHP from remote server?

I am trying to execute following code in PHP. It runs, but returns the result of my local system, where I need the bat file should run on remote system. if( pclose(popen("cmd /c "."\\\\ServerName\...

Show Detail

Executing a Remote Bat File from A Remote Server

Want to do something like this but only returns the string of the scriptblock and no output. How would I get this bat file to execute and produce the desired output csv file? Invoke-Command -

Show Detail

Run a Bat file in remote server without prompting for password

I have 2 windows servers (Let's say Server1 and Server2). On Server2 there is a batch file server2.bat. I need to execute that batch file on Server2 from Server1. Hence I have created a remote_run....

Show Detail

run .bat file on remote machine

I try to run .bat file on remote machine. From my machine i mapped the folder where my .bat (on the remote machine) is exist and from my machine i just try to run the file: os.system(r'‪Y:\file.b...

Show Detail

Bat File wait for remote input

is it possible to make a bat file that waits for a remote command that is cross-domain? that way I can set up a bat file on my computer at home that clicks accept (for chrome remote desktop) when I...

Show Detail

I can not start .bat file on the remote server

I can not start .bat file on the remote server, which should start services if they are disabled. The file runs only on the local computer. @echo off sc query "$Servicename$" | find /i &...

Show Detail

groovy executing shell commands on remote server

I have an issue about executing shell commands on a remote server. I'm trying various solutions and I have one working but it is not optimized in terms of maintenance : I use a batch file that la...

Show Detail

Executing exe or bat file on remote windows machine from *nix

I am trying to execute a bat file on remote windows machine on cloud from my Linux. The bat files starts selenium server and then my selenium tests are run. I am not able to start selenium RC serve...

Show Detail