Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're running a Windows Server 2008 AD serving as DHCP and DNS for more than 300 PC.

When a PC desktop with the name "harry" connects to the network, the DHCP server gives it a lease, and adds appropriate A & PTR records via Windows DHCP+DNS.

This works fine; points to, the client knows that its name is, points back to, and all that is great.

Now I want every PC to have a wildcard : e.g * to resolve to, but I don't want to manually prepare a wildcard record for each of the 300 DHCP PC in the AD.

Is there a way to do this?


PS: my need is extremely close to this other question (but with unix, isc-dhcpd and bind, which I am much more familiar with...) so I took it as a template: Automatic subdomain wildcard for DHCP-DDNS additions?

share|improve this question
up vote 0 down vote accepted

In a cmd.exe on the DNS server :

for /F %%a in (host-list.txt) do 
  dnscmd /recordadd mydomain.tld *.%%a cname %%a.mydomain.tld.

Note: host-list.txt should contain every hostname on your network. One way to create host-list.txt is to edit the result of the following command :

dnscmd /enumrecords mydomain.tld @ /type A

It's not perfect though, as it creates lots of new subzones in the DNS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.