How to access cmd of another computer from my computer's cmd?

How can I access the Command Prompt of another computer from my own computer's Command Prompt in Windows7?

I am hoping that I can do something like that into a batch file:

Enter \\ComputerA -u John -p 123
Run some commands on ComputerA
Leave ComputerA
Enter \\ComputerB -u Jane -p 123
Run some commands on ComputerB
Leave ComputerB
Return to on my computer's console

It's like in Task Scheduler, I can connect to another computer and do some stuff remotely from my computer. 

Can I do this in cmd? 

1 Answer

Checkout the MS tool psexec (used to be sysinternals)

From:

Usage: psexec [\\computer[,computer2[,...] | @file]][-u user [-p psswd][-n s][-r servicename][-h][-l][-s|-e][-x][-i [session]][-c [-f|-v]][-w directory][-d][-<priority>][-a n,n,...] cmd [arguments]

You can enclose applications that have spaces in their name with quotation marks e.g.

psexec \\marklap "c:\long name app.exe"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like