Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

C:\BigHomie> Mount-WindowsImage -ImagePath C:\VHDs\BigHomies.vhdx -Path C:\VHDMount -Index 1

Then, capture it into a wim with

C:\BigHomie> New-WindowsImage -CapturePath C:\VHDMount -Name Win7Image -ImagePath C:\CapturedWIMs\Win7.wim -Description "Yet another Windows 7 Image" -Verify

And let it do it's thing.

share|improve this answer
1  
Correction to the second command: -ImagePath should specify the full path to the WIM file (e.g. C:\CapturedWIMs\NewWinImage.wim), while -Name is the name of the image inside the WIM file (e.g. NewWinImage, but has no actual relation to the WIM file name). Executing the originally posted command results in "New-WindowsImage: Access is denied." (presumably because the command attempts to treat the C:\CapturedWIMs directory as a file). –  Jakub Berezanski Oct 1 at 22:34
    
Interesting analysis, technet's example also seems to agree with you. I'll update it, even though I ripped this straight from my powershell prompt lol. –  BigHomie Oct 3 at 12:20

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.