[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1590
  • Last Modified:

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,



0
rrudolph
Asked:
rrudolph
  • 4
  • 4
  • 2
  • +2
4 Solutions
 
Farhan KaziSystems EngineerCommented:
Are you able to Ping 'D410' machine name?

0
 
ificuserCommented:
Well the error tell you what is wrong, your admin share is either disabled or not setup with the right permissions. go to my computer right click on the c drive and go to sharing. Do you see the c$ as a share. If you don't, try making it and try it again. it should work
0
 
acsd1Commented:
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"
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
acsd1Commented:
That should have been:
net use P: \\IPADRESS1\C$\FOLDER1 /user:USERNAME PASSWORD /persistent:yes
xcopy /D /Z /Y "P:\*.*" "C:\FOLDER2"

"D410" has to be a resolvable name (try doing "nslookup D410" and make sure you get an IP) -- if it's not you need to use the IP/FQDN.
0
 
DenisCooperCommented:
you most likely find that you haven't fully enabled sharing on the windows xp pc....

from my computer, go to the view menu, and folder options, from their locate the option that says use simple file file and print sharing and disable it.

then right click on your c drive, and goto sharing, if prompted you will need to make sure that you have gone through to say just enable file sharing.

in the windows xp firewall - make sure that you have the firewall disabled....if you have any other firewall software on the pc, then disable this too....
0
 
rrudolphAuthor Commented:
acsd1,

nslookup D410 fails, what do you mean when you say use IP/FQDN?

thanks,

Rick
0
 
acsd1Commented:
Use the IP address or fully qualified domain name.

To be safe, just use the IP address.
0
 
acsd1Commented:
If D410's IP address is 192.168.1.20, substitute the IP for the name.
For example:
c:\psexec -u username -p password  \\192.168.1.20 cmd.exe /c dir

rrudolf, are the two computers on the same LAN?
0
 
rrudolphAuthor Commented:
Unfortunately, I receive the same error with both. I am on one 192.168.0.....network, and the Terminal Server is on a different 192.168.0...network. I have also tried this with my Verizon Modem card, so I was given an entirely different ip address..The network path was not found....I have a related questions, I am using one of the two administrative RDP settings, this is not a true "Terminal Server" in application mode, would that make a difference?
0
 
DenisCooperCommented:
have you checked my post?
0
 
rrudolphAuthor Commented:
Dennis,

Thanks for your follow up, I had already completed all of your suggestions, I did check again to make sure all looked correct, and it looks fine.
Rick
0
 
rrudolphAuthor Commented:
Everyone,

Thanks for your help. I believe that the source of my problem was actually firewall port issues, but I have this working on my LAN, and should be able to work out the rest.

Rick
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now