Solved

Run a Ms-Dos Command Remotely

Posted on 2011-03-16
6
282 Views
Last Modified: 2012-05-11
Hi,

I need to run a Ms-Dos command from one server to another. say i m on  server 78.246.105.126 and need to execute a command on 78.246.105.125 how would I execute that command. The background of the problem is i have  search server program installed on 78.246.105.125 and I need to run a clear search command like indexeradmin clearcollection ABC from 78.246.105.126?

78.246.105.125 has windows server 2003 installed on it.
0
Comment
Question by:mmalik15
  • 3
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
LeDaouk earned 500 total points
ID: 35147324
0
 
LVL 16

Expert Comment

by:Brian Pringle
ID: 35147357
You want to use PSExec from the above link.  You issue the following to run the program

psexec \\computername programname.exe
0
 

Author Comment

by:mmalik15
ID: 35147422
thanks for the comments

I have slightly different issue as i dont want to run an exe file on a remote computer.

say if i m logged on 78.246.105.125 and i have command window open i will type in the following command and this command would execute

C:/indexeradmin cleancollection somename

now I want to run and schedule this command using a batch file on 78.246.105.126. I know how to create a task and schedule it, all i m looking for is the command which i need to put in batch file
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:LeDaouk
ID: 35147443
yeh use it to run the command prompt on the remote computer
0
 
LVL 4

Expert Comment

by:LeDaouk
ID: 35147449
psexec \\computername cmd.exe
0
 
LVL 16

Expert Comment

by:Brian Pringle
ID: 35147487
If you are asking about making a scheduled task, the command is "at".  Go to a command line and issue the following command for instructions.

at /?

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question