Reputation: 983
I have a powershell script that copies a large (80+ gig) set of files to a network location. Everything worked fine when copying to a location drive but now copying to the backup location on the network the file transfer seems to just hang. It appears as though the transfer is actually done since the file is the correct size on the destination and there is no network usage when looking at PerfMon so it seems like it is just waiting or confirming something. Has anyone else seen an issue like this or is there a way to flag the copy operation as "do not validate"?
Upvotes: 1
Views: 4251
Reputation: 72640
Perhaps your problem appends because of network troubles or SMB troubles. You don't give any details about the operating systems of the 'from' and 'to' machines, and it can have an impact too.
This is just a suggestion : Have you try to use Copy-Item
on a remote file system mounted with PowerShell like in the example here-under
New-PSDrive -Name Y -PSProvider filesystem -Root \\ServerName\Share
Copy-Item BigFile Y:\BigFileCopy
Upvotes: 1
Reputation: 3419
Powershell is awesome but sometimes calling external programs can provide a more robust solution; I always call Robocopy from Powershell when transferring large files over a network and would recommend you use this approach.
Upvotes: 4