Link to home
Create AccountLog in
Avatar of Andy Brown
Andy BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Paste files from local PC to Remote Desktop using Powershell

I am looking at the various way to copy files from a users local PC to a specific folder location - on a Remote Server.  Essentially, it would work in the following way:

  • User copies files on local PC
  • They switch to the RDP server
  • Press a button on our application that runs a script and pastes the file into a specific folder

We need this paste function to run int the background and I was wondering if we could use Powershell to do this.  Incidentally, our server is running 2012 R2.
SOLUTION
Avatar of ITSysTech
ITSysTech

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Andy Brown

ASKER

Thank you so much for coming back to me - it looks interesting and I'll take another look tomorrow (when I'm a little more awake).

The problem that I have is, that on the users local PC - I can't install any software and need to rely on them to manually copy the files to the clipboard.  However, once they are on the RDP - I can do whatever needs to be done.

Thanks again for coming back to me so quickly - I need to sign off now and get some dinner.
Avatar of David Johnson, CD
powershell is included with all current windows operating systems the problem is that scripts are disabled
The clipboard is not usable here. as the clipboard contains the contents of the file.. copy and paste operates differently depending upon the context, within a file it copies the text to the clipboard otherwise it just buffers the selection.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks David - good information
Ben - that looks like a really good option, I'll take a look

Thank you everyone - I'll report back....
Thank you everyone for your help.  In the end, I just opted to share the C drive and use Ben's solution.
hey Andy, glad that was helpful to you :)