A. A script is available from Microsoft that allows you to pass a WIM file, the image you want to select from the WIM file, an unattended answer file to automate the installation, VHD size and type, and a destination VHD name and location. The script uses the information to create the VHD that you can then use on a virtual server or to natively boot from for Windows 7 Enterprise and Ultimate.
Detailed examples of usage are given on the site, so check it out. It works really well.