Pass the ISO path, desired disk format (VHD or VHDX), and the specific edition (Pro, Home, or Enterprise) as parameters.
Microsoft also provides a VHDX pre-loaded with:
Boot into the VHD (natively or via VM) and enter your legitimate Windows 10 license key.