1
Vote

Snapshot.ps1 - cannot validate variable

description

I pulled down THE latest Gold+R2 or something, and I get this error when trying to select/remove a snapshot:

The variable cannot be validated because the value is not a valid value for the VM variable.
At C:\Program Files\modules\HyperV\SnapShot.ps1:176 char:28
  • if ($VM -is [String]) {$VM=(Get-VM -Name $VM -Server $server) }
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : MetadataError: (:) [], ValidationMetadataExcepti
      on
    • FullyQualifiedErrorId : ValidateSetFailure

file attachments

comments

bitdoctor wrote Aug 2, 2013 at 8:43 PM

seems to be this line:
if ($VM -is [String]) {$VM=(Get-VM -Name $VM -Server $server) }