Run a Batch File placed on a server using the command line in Windows operating system. This is helpful in automating tasks and running scripts on a different server.

For running batch file placed on a server use the below command:

wmic /node:<target-computer-name/hostname> process call create "path\\to\\batch.bat"


For e.g

If you need to run Batch file abc.bat placed at path D:\Test on a server which you already have access and whose hostname is XXYY00122L

Open command prompt and type the command as shown below and hit enter.

This would run the batch file placed on the server.