Remote script Export VM to a shared folder

Jan 13, 2012 at 3:15 AM
Edited Jan 13, 2012 at 3:17 AM


We had 4 Hyper-V host in our environment, I want make and run a Powershell script in one place, export all the VMs in 4 host to a shared folder one by one.

All the host and Shared folder are the member of same domain. Also I had read and act following the documents and , but I still get "Failed to create export directory with error 'General access denied error'(0x80070005)".

In my test I find that the command can export the local VM to a remote shared folder, it also can export the remote VM to the VM's host local folder even if I use the path as \\localhostservername\sharedname.

What's the wrong with me?



Jan 13, 2012 at 9:20 AM


Do you restart Hyper-V hosts after giving permitions to the network share? Host get this permitions only after restart.

You post "Failed to create export directory with error 'General access denied error'(0x80070005)", so...

What kind of permitions do you give to hyper-v host? Maybe it havn't rights to create/remove folders?

Also, check the path, what you want to create by your script.

Waiting for reply. :)

Jan 16, 2012 at 12:55 AM


Thanks for your help.

I had restart all the three servers, but the error message still exist.

The user I login is a member of domain admins, and had administrator permition in the three servers.

From the console I can export to the remote folder, and the path in the script is copied from the address field of explorer.