Skip to content

isehuetdk/code-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

code-snippets

Various scripts and code snippets

Convert-WindowsImage.ps1

Built on the (outdated) Technet Gallery script to be found here: https://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f

Supports as an example Windows 10 WIM to VHD(X).

Example:

  1. Get Windows Image details from source to convert:
Get-WindowsImage -ImagePath '.\Windows 10.wim'

You will need ImageName parameter of the image in scope for the next step (example: myImage).

  1. Convert the image by running the below code to have it compatible with a Hyper-V Gen1 VM:
Convert-WindowsImage -SourcePath '.\Windows 10.wim' -VHDFormat VHD -VHDPath .\Win10.vhd -Edition 'myImage' -VHDPartitionStyle MBR -Verbose

About

Various scripts and code snippets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published