x0nn / Convert-WindowsImage

Creates a Windows VM for Hyper-V from a Windows-ISO
GNU General Public License v3.0
80 stars 21 forks source link

ShowUI not working #31

Open ChuckM2 opened 2 years ago

ChuckM2 commented 2 years ago

First, I want to thank you. Your script was the only thing I could get to work without crashing for Windows 11 ISO files.

When I tried the -ShowUI setting, it did not work and these are the errors that I saw. (Command line without -ShowUI did eventually work.) I was able to browse to the ISO, pick the "edition" of windows from the drop down" and hit the create VHD button before the last messages. No VHD was produced.

PS E:\OS_IMAGES> Convert-WindowsImage -ShowUI
Get-Item : Cannot bind argument to parameter 'LiteralPath' because it is null.
At E:\OS_IMAGES\Convert-WindowsImage.ps1:365 char:46
+         $SourcePath = (Get-Item -LiteralPath $SourcePath).FullName
+                                              ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-Item], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetItemComm
   and

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

Write-LogMessage : 2022-06-15T00:04:46 [*****-DESK] No source path specified.
At E:\OS_IMAGES\Convert-WindowsImage.ps1:2394 char:13
+             Write-LogMessage $_ -logType Error
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-LogMessage

Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At E:\OS_IMAGES\Convert-WindowsImage.ps1:2407 char:27
+             if (Test-Path $VHDPath)
+                           ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Test
   PathCommand