Remote Examples
Example 1: Interact with a batch program running on a remote server
In this example, you must first create a batch program on the server (Remoteserver3 in this case). To create the batch program, you can use any text editor, such as Notepad, or the copy con command at the command prompt as follows:
copy con testprog.bat
pause
schtasks /?
pause
^Z
Press CTRL+Z (^Z) to end the copy con session and save the Testprog.bat file in the default directory.
On the server
To start the remote session at the server, type the following on the server at the command line:
remote /s "testprog.bat" testsession1
Complete Article