1. Follow Microsoft guide to create the WinePE Disc Media https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/download-winpe–windows-pe?view=windows-11
  2. Boot with the Winpe Image (C:\WinePE)
  3. Type the following commands to create an image and to store it on the D drive
wpeinit

cd\

dism /capture-image /imagefile:"D:\NameoftheImage.wim" /capturedir:D:\ /name:NameoftheImage /compress:max

By Nizar