New-VM Not working

Feb 12, 2009 at 2:53 AM
I am using version 1.0b of the powershell hyperv library. It was working fine yesterday and today but tonight it isn't. If I load the library with . .\hyperv.ps1 it loads all the functions. If I then type

$tenby = new-VM "Tenby" -server "."

I get the following error displayed in red

Exception setting "ElementName": ""
At E:\Shared\Hyper-V\lib\hyperv.ps1:802 char:10
+   $vmGsd.E <<<< lementName=$name

I put a write-host just before this line to print $name and it has the value "Tenby". The VM is created but it has the name "New Virtual Machine"

This was working a few hours ago and nothing to my knowledge has changed.

Best wishes....
Colin
Feb 13, 2009 at 9:41 PM
I just downloaded 1.0b and ran similar commands. It created the VM without any issues, AFAIK. This probably does not help you in your case, but maybe trying these commands on a different server, or restart might help.

$vm

 

 

= New-VM -name "Test-New" -server "myserver-2008"

 

Feb 14, 2009 at 2:15 AM
Thanks for the reply. Its strange becaues I just tried the same command again and it works now. I'm the only person using the server just now and this is the first time I've logged in since I posted the query. As far as I know nothing has changed - not even a reboot. Oh well hopefully it will be gone for good now. It's a great library anyway

Best wishes.....
Colin