Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy files to a remote server via RDP using a script

We have a couple production servers that are configured to only allow access via RDP. There are no acessible shares. The dev team have no say in changing this setup but we want to automate code deployments to these machines. Presently we have to set Remote Desktop to share a local drive with the server, then RDP to the server and manually copy the deployment.

Any one know of a way to tunnel over RDP and drop files to a given directory on the remote host from the command line? The instructions will need to be included in an MSBuild configuration.

like image 468
grenade Avatar asked Dec 08 '09 14:12

grenade


People also ask

How do I copy files to a remote desktop server?

In Remote Desktop , select a computer list in the sidebar of the main window, select one or more computers, then choose Manage > Copy Items. Add files or folders to the “Items to copy” list. Click Add to browse local volumes for items to copy, or drag files and folders to the list.

Can I use RDP to transfer files?

Once the RDP console opens, go to the remote machine's My Computer folder and click the new drive named Cloud Storage on <IP address> here. This is the temporary folder that will enable you to transfer files to and from the remote machine.

Can you copy and paste through RDP?

Transferring Files via the Clipboard As of RDM Mac 2022.1. 13, if you want to transfer a file between your computer and a remote system connected through the embedded RDP session type, simply copy and paste it! Copy the file on your system and paste it onto the remote computer, or vice-versa. It's that easy.


1 Answers

If you can get WS-MAN set up, PowerShell remoting and/or pmodem might be your ticket? http://www.nivot.org/2009/11/02/PowerShell20IntroducingThePModemFileTransferProtocol.aspx (Alternate link: http://www.nivot.org/blog/2009/11/default )

like image 71
Ruben Bartelink Avatar answered Sep 30 '22 12:09

Ruben Bartelink