I am writing a PowerShell script that needs to be able to download many large files from many servers (i.e. windows server hosts) at once. Many of these servers may be used for important activities and it is therefore important that the transfer method has the ability to fade into the background when load on the servers start to get high.
Here are 3 transfer methods I know of along with reasons why I don't think they're good enough for the job.
BitsTransfer: The first thing that came to mind was BitsTransfer (https://docs.microsoft.com/en-us/powershell/module/bitstransfer/start-bitstransfer?view=win10-ps), however, there is a fatal issue with this approach in that it can't transfer files that're in use for writing by other processes, and a lot of the files that need to be downloaded from the servers will be in such a state. See start-bitstransfer : The process cannot access the file because it is being used by another process for that issue...
Copy-Item: This gives no control over it's priority, and so there exists the potential that a large file transfer could ground a server to a halt whilst it is processing an important load.
Robocopy: Again, I see no mention of priority or background processing.