Question : Using psexec while logged in vie Remote Desktop to a terminal Server

I am trying to run a batch file on my local computer while logged into a terminal server.The terminal server has some data that I would like to pass to my local computer. Based upon the advice I received related to a similar question, someone recommended that I use psexec. I have tried this many different ways, but am getting what appears to be an authentication problem.

Here is what I type in at the command line on the terminal server:

I'm simply trying to run dir in order to test this idea

c:\psexec -u username -p password  \\D410 cmd.exe /c dir

The User has Admin rights and the password is not blank
I have read and checked all of the suggestions at this link:

http://forum.sysinternals.com/forum_posts.asp?TID=3748&PN=1


This is what is displayed

Couldn't access D410:

The network path was not found

Make sure that the default admin$ share is enabled on D410.

Am what I'm attempting even possible? And if so any ideas on what I need to correct?

Thanks,



Answer : Using psexec while logged in vie Remote Desktop to a terminal Server

Yes, it's possible, i just tried it and it worked.  First be sure that the user/password you are using is a local administrator on the target computer.  Also, make sure C$ is being shared - right click on "my computer" go to "manage" and under "Computer management > System tools > Shared Folders > Shares" make sure that "C$" is under the "shared folder " column.  Also the firewall on the target computer does not allow "File and Printer Sharing" to the computer you're running the command from, it will be blocked (TCP port 445 I believe).

For passing files between computers, I usually just mount a network folder using the "net use" then copy it with the "xcopy" command. Here's an example of how to copy all files in FOLDER1 on a remote computer to FOLDER2 on your local computer:

net use P: \\IPADRESS1\C$\FOLDERNAME1 /user:USERNAME PASSWORD /persistent:yes
xcopy /D /Z /Y "P:\*.*" "C:\LOCALFOLDERNAME"
Random Solutions  
 
programming4us programming4us