I had to add the variable $SourceFile = $CaptureFolder + ""+ $ImageName + ".wim" to the ImagefactoryV3-CoverttoVHD.ps1 to get the powershell to work.
New-Item -Path $VHDxFolder -ItemType Directory -Force
$wims = Get-ChildItem -Path $CaptureFolder -Filter *.wim
foreach($wim in $wims){
$SourceFile = $CaptureFolder + "" + $ImageName + ".wim"
write-host image: $SourceFile
$WindowsImage = Get-WindowsImage -ImagePath $wim.FullName
I had to add the variable $SourceFile = $CaptureFolder + ""+ $ImageName + ".wim" to the ImagefactoryV3-CoverttoVHD.ps1 to get the powershell to work.
New-Item -Path $VHDxFolder -ItemType Directory -Force
$wims = Get-ChildItem -Path $CaptureFolder -Filter *.wim
foreach($wim in $wims){
$SourceFile = $CaptureFolder + "" + $ImageName + ".wim"
write-host image: $SourceFile
$WindowsImage = Get-WindowsImage -ImagePath $wim.FullName