Transfer file using MSTSC in Command line
Asked Answered
T

4

8

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.

Tedmund answered 23/11, 2010 at 12:31 Comment(0)
H
0

There is no command line switch or Remote Desktop Services API to let you to access the remote session.

You can write a file server (e.g. FTP) or a virtual channel to transfer the files.

Hutner answered 6/12, 2010 at 2:32 Comment(0)
M
5

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.

Mm answered 2/12, 2010 at 21:57 Comment(2)
This is exactly what i do except robocopy, i want to totally automate logging and then copying the data..Tedmund
Unfortunately, jump servers make automation virtually impossible because you have no direct access to the remote server(s). As I mentioned, we're trying to get the gods of security to allow us to open a couple of ports just for BITS. WinRM would also be an option but they won't let us have any type of logon session directly through a secured firewall.Mm
U
1

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.

Unrestrained answered 1/6, 2011 at 7:58 Comment(0)
P
0

Can't you use a Scheduled Task? I'll generally try and use a batch file or something simple, or you can use robocopy etc.

Pneumodynamics answered 23/11, 2010 at 12:35 Comment(1)
Sorry i have not used Robocopy, does it support connecting to remote machines, logging in and then copying data?Tedmund
H
0

There is no command line switch or Remote Desktop Services API to let you to access the remote session.

You can write a file server (e.g. FTP) or a virtual channel to transfer the files.

Hutner answered 6/12, 2010 at 2:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.