While getting ready for an event that will be staged completely with WDS, I ran into issues capturing a VHD file to a WIM file using WDS. My guess is that the old Mac Mini I’m using is not keeping up so I needed a way to get that VHD to convert to a WIM file.
I found this thread that explains a couple of methods to do this, so here are my results on the first one.
Using PowerShell to Convert to WIM
The process is very simple, mount the VHD to a directory and then use the New-WindowsImage commandlet do its job.
Create the directory to where you would like to have the image mounted before you run the following command:
Mount-WindowsImage -ImagePath “C:\VMs\VHDs\Test WDS.vhdx” -Path C:\VHDMount -Index 1
Once that command runs, you’ll see the contents on c:\VHDMount:
New-WindowsImage -CapturePath C:\VHDMount -Name Win8Test -ImagePath C:\CapturedWims\Win8.wim -Description “Windows 8 Clean” -Verify
Finally, unmount the image discarding any changes as none should have been made to the master VHD:
Dismount-WindowsImage -Path C:\VHDMount -Discard