Results 1 to 8 of 8

Thread: cmd batch

  1. #1
    Join Date
    Jul 2004
    Posts
    2,250
    Rep Power
    0

    Default cmd batch

    anyone know the command to run a ping from a remote computer and send the output my local c drive...

    This is the command i have for running it on my local machine:

    ping 10.10.10.10 >>c:\pinglog.txt


    ** i need the command to run it on a remote machine from my local host and send the report back to my local pc.
    The price of anything is the amount of life you exchange for it.
    Henry David Thoreau

  2. #2
    Join Date
    Aug 2002
    Posts
    6,327
    Rep Power
    0

    Default

    For those of you who know the power of the command line, you also know that it is really useful to be able to run some of these command line tools remotely. There are a number of different ways to do this. I would like to share with you a couple of my favorites.

    PsExec

    If you are not familiar with PsExec, then this is going to be a bit of a revelation for you. PsExec is a freeware program that allows you to execute a command on a remote machine. If that command is a command line program, it will send the output of that command back to you.

    The real trick comes when you run the command console. Try this command:

    psexec \\RemoteComputer cmd.exe

    where \\RemoteComputer is the name or IP address of the remote computer (Make sure you use the \\ otherwise the command will fail.)

    What this does is connect to the remote computer and then open a command prompt on the remote machine. You can then work with this new command prompt and it will execute all of your actions on the remote system!

    In order for this to work for you, you need to have the admin$ share active on the remote computer (which it is by default) and you need to have account information with administrative access to the system. This is mainly used in situations where you have a Windows network and you are the administrator of the network.
    ---- http://dailycupoftech.com/2007/07/16...remote-system/


    should work
    Let Them Hate, So Long As They Fear.
    You do not know whereof you speak,and your words are empty things.
    Listen and gain Wisdom.

    http://twitter.com/nestersan

  3. #3
    Join Date
    Jul 2004
    Posts
    2,250
    Rep Power
    0

    Default

    Thanks big man i will look into that
    The price of anything is the amount of life you exchange for it.
    Henry David Thoreau

  4. #4
    Join Date
    Aug 2004
    Posts
    321
    Rep Power
    0

    Default

    Or if u wanted to, you could enable the Telnet Server in Windows, connect to the machine remotely and run the command with the option to output to a shared network path.

  5. #5
    Join Date
    Apr 2005
    Posts
    163
    Rep Power
    0

    Default

    ping 10.10.10.10 >> \\"yourcompname"\"shareucreated"\pinglog.txt

    e.g. ping 10.10.10.10 >> \\AdminPC\c$\pinglog.txt

    If u use ">>" the result will be appended to each time, if u want new results use ">".

  6. #6
    Join Date
    Aug 2002
    Posts
    6,327
    Rep Power
    0

    Default

    no, he wants to run the ping command local from another machine not from his, so all you are doing is creating the log on a remote share, not really the idea.
    Let Them Hate, So Long As They Fear.
    You do not know whereof you speak,and your words are empty things.
    Listen and gain Wisdom.

    http://twitter.com/nestersan

  7. #7
    Join Date
    Apr 2005
    Posts
    163
    Rep Power
    0

    Default

    this is the command he will have to use (along with any remote exec util) to get the log file created back on his local pc.

  8. #8
    Join Date
    Aug 2002
    Posts
    6,327
    Rep Power
    0

    Default

    that be the EASY part dude....
    Let Them Hate, So Long As They Fear.
    You do not know whereof you speak,and your words are empty things.
    Listen and gain Wisdom.

    http://twitter.com/nestersan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •