I juste setup et sysprepped a nice nouveau VM, now J'ai besoin de to convert it to a wim real quick, to upload to mon sccm server. For certains reason, Je ne peux pas changez le VM properties to boot depuis a legacy nic for pxe, qui is how I usually capture mon images using sccm. VMM juste changes le settings right back, even bien que it says successful.
Anyway, le premier page of google was *terrible* for this, w/ le exception of a 3rd party .ps1 script on MS's website, mais Je suis using 2012r2, I should be able to do this natively, right?
Comment convertir un fichier VHD en fichier WIM ?
Re: Comment convertir un fichier VHD en fichier WIM ?
Absolutely, let's post a prim et proper answer for Google. Ceci est a simple 2 command Powershell execution, using le `dism` module. The dism can be copied to earlier versions of Windows, provided you have le approprié version of le windows management framework.
First, mount le vhd using
```
Mount-WindowsImage -ImagePath C:\VHDs\BigHomies.vhdx -Path C:\VHDMount -Index 1
```
Then, capture it into a wim with
```
New-WindowsImage -CapturePath C:\VHDMount -Name Win7Image -ImagePath C:\CapturedWIMs\Win7.wim -Description "Yet another Windows 7 Image" -Verify
```
And let it do c'est thing. When you are done you can unmount le vhd et discard tout changes using:
```
Dismount-WindowsImage -Path C:\VHDMount -Discard
```
First, mount le vhd using
```
Mount-WindowsImage -ImagePath C:\VHDs\BigHomies.vhdx -Path C:\VHDMount -Index 1
```
Then, capture it into a wim with
```
New-WindowsImage -CapturePath C:\VHDMount -Name Win7Image -ImagePath C:\CapturedWIMs\Win7.wim -Description "Yet another Windows 7 Image" -Verify
```
And let it do c'est thing. When you are done you can unmount le vhd et discard tout changes using:
```
Dismount-WindowsImage -Path C:\VHDMount -Discard
```