This page explains how you can script the creation of new domains in a Windows DNS server using the dnscmd utility.
For one of my projects, I needed to find a way to redirect requests from local machines to for example google.com to a local webserver. To accomplish this, I setup a DNS server, made sure that all the local machines were using this DNS and added google.com in this DNS server to redirect to my local server.