Windows Nano Server 2016 CTP4 - Não é possível encontrar o tipo WIM2VHD.WimFile

1

Alguma idéia de como eu posso lidar com esse erro ao tentar criar um Windows Nano Server 2016 CTP4?

**********************
Windows PowerShell transcript start
Start time: 20160405151609
Username: COMPUTERNAME\Derik
RunAs User: COMPUTERNAME\Derik
Machine: COMPUTERNAME (Microsoft Windows NT 10.0.14295.0)
Host Application: C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe
Process ID: 15720
PSVersion: 5.1.14295.1000
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14295.1000
CLRVersion: 4.0.30319.42000
BuildVersion: 10.0.14295.1000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
INFO   : Looking for the requested Windows image in the WIM file
PS>TerminatingError(New-Object): "Cannot find type [WIM2VHD.WimFile]: verify that the assembly containing this type is loaded."
ERROR  : Cannot find type [WIM2VHD.WimFile]: verify that the assembly containing this type is loaded.
INFO   : Log folder is C:\Users\Derik\AppData\Local\Temp\Convert-WindowsImagefde98b4-a454-4ce2-86f6-cc15a22cb2b1
INFO   : Done.
**********************
Windows PowerShell transcript end
End time: 20160405151609
**********************

Código do PowerShell:

Import-Module 'C:\NanoServerImageGenerator.psm1'

$serverName = "server-name"
$password = ConvertTo-SecureString "strongPassword" -AsPlainText -Force

$VMdir = "E:\VMs\Hyper-V"
$projectDir = Join-Path $VMdir $project
$serverPath = Join-Path $projectDir $servername
$nanoBasePath = Join-Path $serverPath "NanoBase"
$VHDExtension = "vhdx"
$VHDName = "$servername.$VHDExtension"
$VHDPath = Join-Path $serverPath $VHDName

$MediaPath = "\uncpath\InstallMedia"
$MediaName = "WindowsServer2016_CTP4_X64FRE_EN-US.ISO"
$MediaPath = Join-Path $MediaPath $MediaName

$mountResult = Mount-DiskImage $MediaPath -PassThru
$mountedDriveLetter = ($mountResult | Get-Volume).DriveLetter

$MediaPath = "$mountedDriveLetter':\"

if(-not (Test-Path $projectDir)) { New-Item $projectDir -ItemType Directory }
if(-not (Test-Path $serverPath)) { New-Item $serverPath -ItemType Directory }
if(-not (Test-Path $nanoBasePath)) { New-Item $nanoBasePath -ItemType Directory }

#<#
New-NanoServerImage '
    -MediaPath $MediaPath '
    -BasePath $nanoBasePath '
    -TargetPath $VHDPath '
    -ComputerName $serverName '
    -OEMDrivers '
    -AdministratorPassword $password '
    -Clustering 
#>

$mountResult | Dismount-DiskImage
    
por SQL Hammer 05.04.2016 / 21:28

1 resposta

1

Eu estava faltando um passo crítico.

cd "C:\NanoServer\"
.\Convert-WindowsImage.ps1 -WIM 'C:\NanoServer\NanoServer.wim' '
    -VHD 'C:\NanoServer\ClusterNanoServer.vhdx' '
    -VHDFormat VHDX -SizeBytes 10GB -Edition 2 -DiskLayout UEFI

Eu precisava criar um arquivo VHD ou VHDX a partir do arquivo NanoServer.wim, disponível na mídia de instalação do Windows Server 2016.

    
por 06.04.2016 / 02:41