Convert-WindowsImage icon indicating copy to clipboard operation
Convert-WindowsImage copied to clipboard

Directly use index if Edition fits exactly

Open bezik46 opened this issue 2 years ago • 6 comments

In command I have: -Edition "Windows Server 2022 SERVERSTANDARD"

Yet output shows:

Windows(R) Image to Virtual Hard Disk Converter for Windows(R)
Copyright (C) Microsoft Corporation.  All rights reserved.
Copyright (C) 2019 x0nn
Version 10.0.14278.1000.amd64fre.rs1_es_media.160201-1707

WARNING: 2022-01-22T08:16:22 [SP-P-MEDIA] The following images are in the image:
WARNING: 2022-01-22T08:16:22 [SP-P-MEDIA] Name: "Windows Server 2022 SERVERSTANDARDCORE" (Index: 1)
WARNING: 2022-01-22T08:16:22 [SP-P-MEDIA] Name: "Windows Server 2022 SERVERSTANDARD" (Index: 2)
Write-LogMessage : 2022-01-22T08:16:22 [SP-P-MEDIA] There is more than one WindowsImage (Edition) available. Choose
with -Edition using Name oder Index from the list above.
At C:\Convert-WindowsImage.ps1:2394 char:13
+             Write-LogMessage $_ -logType Error
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-LogMessage

bezik46 avatar Jan 22 '22 08:01 bezik46