So you need to make an install.wim for WDS from the ISO / Media
Important. Before you start, make sure that your machine has Windows ADK installation. and run all commands elevated as CMD(Administrator)
First, lets get info from ESD file to check available images.
These are usually indexed so you can build specific images for the different SKUs of Windows, Pro, Home, Single Language, Education.
In the path of the Windows installation media e.g.
dism /Get-WimInfo /WimFile:install.esd
Now we can build the image, this can take a while as the image is typically 2-3GB
dism /export-image /SourceImageFile:install.esd /SourceIndex:1 /DestinationImageFile:install.wim /Compress:max /CheckIntegrity