microsoft / MSLab

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

HCI 22H2 : CreateParentDisks.ps1 failed with error "Method invocation failed because [System.Char] does not contain a method named 'contains'." #579

Closed edronne closed 4 months ago

edronne commented 4 months ago

Hello,

I downloaded HCI 22H2 ISO from Azure portal. When executing the script "2_CreateParentDisks.ps1" it failed with error below. I think it's because the ISO contains only one image.

_Method invocation failed because [System.Char] does not contain a method named 'contains'. At F:\Lab\mslab2-hci\2_CreateParentDisks.ps1:665 char:13

Method invocation failed because [System.Char] does not contain a method named 'contains'. At F:\Lab\mslab2-hci\2_CreateParentDisks.ps1:671 char:13

Get-WindowsImage : There is no matching image. At F:\Lab\mslab2-hci\2_CreateParentDisks.ps1:683 char:21

image

edronne commented 4 months ago

Sorry. I try to use the 2_CreateParentDisks.ps1 rather than ParentDisks\CreateParentDisk.ps1