问题
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.
回答1:
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 )
来源:https://stackoverflow.com/questions/1867180/copy-files-to-a-remote-server-via-rdp-using-a-script