Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transfer file using MSTSC in Command line

Tags:

c#

cmd

mstsc

Part of my daily work involves transferring of data from my system to client system using MSTSC, is it possible to automate this transfer or is there any command line that i can use instead of connecting to the Jumpbox and then manually moving the files.

like image 484
rsapru Avatar asked Nov 23 '10 12:11

rsapru


2 Answers

You said 'jump box' so I'm assuming you need to connect to your jump server and then start your rdp session.

How are you copying the files once you logon to the remote server? Drag and drop (copy/paste) via Explorer? If so this can be hideously slow through a jump server. It's best to use a command line copy utility and the \tsclient mappings.

robocopy \\tsclient\C\somefolder C:\temp *.exe or whatever. Unfortunately this is all predicated on establishing the remote desktop session first so there is no way I'm aware of to initiate a copy from your local workstation to the remote host using a jump server.

One thing we're trying to do is to get our security people to allow firewall rules into our secured zones so we can automate BITS to do the copies for us.

like image 176
Greg Wojan Avatar answered Oct 19 '22 16:10

Greg Wojan


You can use freerdp or rdesktop Linux aplications (for example under virtual server environment if you have not one already) to map remote dirs on local pathes and then copy to it.

There also tool for windows - http://www.analogx.com/contents/download/System/tsdc/Freeware.htm but I had not test it.

like image 1
Hubbitus Avatar answered Oct 19 '22 16:10

Hubbitus