Copying files to/from a Hyper-V Server or Windows Server (server core) computer over RDP

It’s reasonably well known that it’s possible to expose local resources (including local drives) on a remote computer when connecting using the Microsoft Remote Desktop Connection client. Using this method, the local drives are exposed on the remote computer using Windows Explorer (e.g. drive on computername).

Last week, I was working with a Hyper-V Server 2008 computer (the principle would be the same for a server core installation of Windows Server 2008) and, even though I’d connected via RDP, I couldn’t work out where the drive connection was on a machine without Windows Explorer. Then I ran the net use command and saw that there was a remote mapping called \\tsclient\d with a network name of Microsoft Terminal Services, representing my local D: but without a remote drive letter assigned.

I ran net use * \\tsclient\d and the connection was re-mapped – this time with a drive letter assigned (in this case, the system chose Z:) following which, I was able to copy files between to and from Z: (i.e. to/from my local computer’s D:) using the remote host.

8 thoughts on “Copying files to/from a Hyper-V Server or Windows Server (server core) computer over RDP


  1. Hi Mark

    You can also enable the admin share on the Hyper-V server by allowing file and print services through the firewall on the Hyper-v server:

    netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes

    and then just connect to the relevant \\\$ Command is:

    Useful in the lab anyway ;-)

    Cheers mate

    Matt


  2. This is a solution I found rather simple and easy to use and worked.
    If you’ve used Microsoft Virtual PC or Microsoft Virtual Server, you’ll have enjoyed the fact that you can copy and paste between a virtual machine and those platforms. This doesn’t work with Hyper-V however—you can’t copy/paste between a VM and the Hyper-V host.

    The workaround is to do the following:

    1. On your Hyper-V host, create a shared folder and assign Change permission to Everyone.

    2. On the virtual machine running on the host, open the Network and Sharing Center and enable File and Printer Sharing.

    3. On the virtual machine, click Start and type \\host_name\share_name where host_name is the name of your Hyper-V host and share_name is the name of the share you created.

    4. Press ENTER and an Explorer window will open in the VM showing the contents of the shared folder on the host.

    5. You can now copy files from the VM to the host and vice versa as needed.

Leave a Reply