- 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
- Boot with the Winpe Image (C:\WinePE)
- 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