microsoft / MSLab

Azure Stack HCI, Windows 10 and Windows Server rapid lab deployment scripts
MIT License
1.18k stars 284 forks source link

Get-VM : Cannot validate argument on parameter 'Id' #518

Closed TerenceFowler closed 1 year ago

TerenceFowler commented 1 year ago

I keep getting this error and I have not been able to figure out why, is there a step I am missing after running create parent disks?

`Get-VM : Cannot validate argument on parameter 'Id'. The argument is null. Provide a valid value for the argument, and then try running the command again. At C:\HyperV\mslab_v22.07.1\3Deploy.ps1:1597 char:34 $vm = Get-VM -Id $.BaseName -ErrorAction SilentlyCon ...

    + CategoryInfo          : InvalidData: (:) [Get-VM], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.GetVM

Import-VM : Cannot validate argument on parameter 'Path'. The argument is null or empty. Provide an argument that is not
null or empty, and then try the command again.
At C:\HyperV\mslab_v22.07.1\3_Deploy.ps1:1604 char:43
                     $DC = Import-VM -Path $_.FullName
+ CategoryInfo          : InvalidData: (:) [Import-VM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.HyperV.PowerShell.Commands.ImportVM

DC was not imported successfully Press any key to continue ...`

jaromirk commented 1 year ago

Sorry for late response. Can you check if DC VM exists under lab folder? image

jaromirk commented 1 year ago

Closing (no reply from Terence)