0

I have a problem executing PowerShell-Scripts under a Server-Core System.

The command show-hypervmenu which gives me a powershell-menu for configuring VM's. Every time I try to delete or create or something else, I get a error like this one:

For example

     Manage Virtual Machines ...
[10] MSWindowsXP                        [ Stopped    ]

Entering "10" for managing a machine shows following error :

Sie können keine Methode für einen Ausdruck mit dem Wert NULL aufrufen.
Bei C:\Program Files\modules\Hyperv\Menu.ps1:545 Zeichen:88
+           ([bootmedia[]]$vmsd.BootOrder) | % -begin {$b=""} -process {$b += $_.tostring <<<< () +", "} `
    + CategoryInfo          : InvalidOperation: (tostring:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

[ 3] Boot order               :                  [                                                               ]
[ 4] Notes                    :                  [                                                               ]
NULL kann aufgrund von ungültigen Enumerationswerten nicht in den Typ "RecoveryAction" konvertiert werden. Geben Sie einen der folgenden Enumerations
werte an, und versuchen Sie es erneut. Mögliche Enumerationswerte sind "None, Restart, RevertToSnapShot".
Bei C:\Program Files\modules\Hyperv\Menu.ps1:549 Zeichen:127
+                                                                                                     -f [RecoveryAction]$vsgsd. <<<< AutomaticRecove
ryAction ,
    + CategoryInfo          : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException

NULL kann aufgrund von ungültigen Enumerationswerten nicht in den Typ "StartupAction" konvertiert werden. Geben Sie einen der folgenden Enumerationsw
erte an, und versuchen Sie es erneut. Mögliche Enumerationswerte sind "None, RestartOnly, AlwaysStartup".
Bei C:\Program Files\modules\Hyperv\Menu.ps1:552 Zeichen:126
+                                                                                                     -f [StartUpAction]$vsgsd. <<<< AutomaticStartup
Action,
    + CategoryInfo          : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException

It seems like parameters for the commands has not been assigned. Cause they are NULL? I didn't change the PS-Files.

So I'm a bit in trouble with a customer right now. :/ Please help.

2
  • why are you trying to manage hyper-v local to the server core, why not use rsat hyper-v manager?
    – tony roth
    Mar 6, 2012 at 16:32
  • hi tony. cause rsat-tools suxx if u are a member in a domain and the hyper-v core is in an workgroup. it only works for me if both are domain-members. i did everything to solve it. but the manager could help me out. i think there was something wrong in the registry. maybe i did a mistake. now after reinstall everythings works fine.
    – Martin K.
    Mar 7, 2012 at 11:40

1 Answer 1

0

OK. Solved the Problem. Reinstall did it again...

Sie können keine Methode für einen Ausdruck mit dem Wert NULL aufrufen. Bei C:\Program Files\modules\Hyperv\Menu.ps1:545 Zeichen:88 + ([bootmedia[]]$vmsd.BootOrder) | % -begin {$b=""} -process {$b += $_.tostring <<<< () +", "} ` + CategoryInfo : InvalidOperation: (tostring:String) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull

[ 3] Boot order : [ ] [ 4] Notes : [ ] NULL kann aufgrund von ungültigen Enumerationswerten nicht in den Typ "RecoveryAction" konvertiert werden. Geben Sie einen der folgenden Enumerations werte an, und versuchen Sie es erneut. Mögliche Enumerationswerte sind "None, Restart, RevertToSnapShot". Bei C:\Program Files\modules\Hyperv\Menu.ps1:549 Zeichen:127 + -f [RecoveryAction]$vsgsd. <<<< AutomaticRecove ryAction , + CategoryInfo : NotSpecified: (:) [], RuntimeException + FullyQualifiedErrorId : RuntimeException

NULL kann aufgrund von ungültigen Enumerationswerten nicht in den Typ "StartupAction" konvertiert werden. Geben Sie einen der folgenden Enumerationsw erte an, und versuchen Sie es erneut. Mögliche Enumerationswerte sind "None, RestartOnly, AlwaysStartup". Bei C:\Program Files\modules\Hyperv\Menu.ps1:552 Zeichen:126 + -f [StartUpAction]$vsgsd. <<<< AutomaticStartup Action, + CategoryInfo : NotSpecified: (:) [], RuntimeException + FullyQualifiedErrorId : RuntimeException

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .