I was following one of the lability tutorials listed in the repository readme and had a problem using the code listed. I think there is a problem in media.json where one of the resources has a "Url" field that actually should be "Uri". This pull request fixes this.
To recreate the issue do:
Invoke-LabResourceDownload -MediaID 'WIN10_x64_Enterprise_21H2_EN_Eval'
Without the fix it outputs:
New-Object : A constructor was not found. Cannot find an appropriate constructor for type System.Uri.
At line:36 char:21
+ ... $mediaUri = New-Object -TypeName System.Uri -ArgumentList $Media.Uri; ...
etc...
Changing the field from "Url" to "Uri" fixes this.
Hi,
I was following one of the lability tutorials listed in the repository readme and had a problem using the code listed. I think there is a problem in media.json where one of the resources has a "Url" field that actually should be "Uri". This pull request fixes this.
To recreate the issue do:
Invoke-LabResourceDownload -MediaID 'WIN10_x64_Enterprise_21H2_EN_Eval'
Without the fix it outputs: New-Object : A constructor was not found. Cannot find an appropriate constructor for type System.Uri. At line:36 char:21 + ... $mediaUri = New-Object -TypeName System.Uri -ArgumentList $Media.Uri; ... etc... Changing the field from "Url" to "Uri" fixes this.