I just setup and sysprepped a nice new VM, now I need to convert it to a wim real quick, to upload to my sccm server. For some reason, I can't change the VM properties to boot from a legacy nic for pxe, which is how I usually capture my images using sccm. VMM just changes the settings right back, even though it says successful.
Anyway, the first page of google was terrible for this, w/ the exception of a 3rd party .ps1 script on MS's website, but I'm using 2012r2, I should be able to do this natively, right?
Absolutely, let's post a prim and proper answer for Google. This is a simple 2 command Powershell execution, using the
dism
module. The dism can be copied to earlier versions of Windows, provided you have the appropriate version of the windows management framework.First, mount the vhd using
Then, capture it into a wim with
And let it do it's thing. When you are done you can unmount the vhd and discard any changes using:
If, for some reason, Powershell is not an option - do not despair!
In Windows 7 or later, you can mount the .vhd via disk management (link)
Once it is mounted, you can use imagex.exe to capture the .wim (technet link)
Same method as the accepted answer, but without the need for PowerShell