Unspecified Error When Copying A Large File Over a Virtual Machine Connection

From time to time I find I need to copy a large file to a Virtual Machine running on Hyper-V. Normally copying files is easy when using Enhanced Session Mode — a simple copy and paste is all you need… except when dealing with really large files. This is what you get when you try that:

2017-04-17 11_21_11

I ran into this error today when trying to copy a 5.47 GB ISO file, so I thought I’d share a quick tip on copying files using PowerShell Direct, a new feature of Hyper-V available in Windows 10 and Windows Server 2016.

$PSSession = New-PSSession -VMName SERVER-VM-01 -Credential (Get-Credential)
Copy-Item -ToSession $PSSession -Path C:\Local\Path\Image.iso -Destination C:\Remote\Path

That’s all there is to it!

Source: TechNet Blog Post by Ben Armstrong

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s