PSRemote Challenge

rated by 0 users
This post has 1 Reply | 1 Follower

Top 500 Contributor
Posts 14
squeekie Posted: 10-24-2011 4:22 PM

I have a need to copy files from a remote server to another server that will be a scheduled task to run every hour.  The files can be quite large so I found that 'robocopy' is the better utility for this case.  I have read the post for how to utilize it within powershell and it works great locally.

The challenge:

The remote server is in a DMZ part of a cluster while the other server is located in another subnet (local).

Communication is only one way, from Local to DMZ.  (I can copy files up to the server, retrieve files from the server, but I am not able to copy files from the remote server to the local server)

I thought of ps-remote, which works great, I have it configured and I'm able to create sessions, browse, administer etc....

When I launch the robocopy script, it runs it locally of course, but what I need it to do is send those files back to the local server.  Is there a possibility to have the script run locally, connect to the remote server with credentials, check for a specific mount point or drive letter if not connect to other server in cluster (I'm reading cluster cmdlts for this task), get the files copied to the local server and repeat the process every hour (task is fine or invoked by a script)

Thanks, 

Top 10 Contributor
Posts 637
Microsoft MVP
Top Contributor

you cannot transfer files with PSRemoting. There have been solutions that implement a sort-of-FTP, but this uses the rather slow PSRemoting transfer and won't work for large files - takes too long.

robocopy is your best bet. You can run robocopy on the remote server using PSRemoting.

Question is: can you run robocopy manually on the remote server to transfer the files the way you want it? If so, then you can also call the robocopy command from your local system and have it execute on the remote server.

Maybe I got your problem wrong, too...

Page 1 of 1 (2 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.