May 032010
 

Since I’m currently busy with installing multiple ESX servers in our test environment, I needed to create about 32 DNS records. Well since I’m lazy and I’ve really been loving Powershell I thought it would be a nice challenge to use PowerShell and of course the powerful DNScmd command. Since we have a logical IP plan, I could use the following script.

1..32 | % {iex ([string]::format(“dnscmd /RecordAdd mylab.com ESXhost{0} /createPTR A 192.168.10.{0}”,$_))}

Of course there are many other ways. For example, using a CSV file to import the DNS records.

For example:

Import-CSV c:\DNS.csv | foreach {dnscmd /RecordAdd $_.Zone $_.hostname /createPTR A $_.IPaddress}

However, keep in mind that PowerShell uses comma separated files and not the semicolon separated file which Excel automatically creates. So for example, use:

Hostname,IPaddress,Zone
ESX1,192.168.10.50,MyLab.com
ESX2,192.168.10.51,MyLab.com
ESX3,192.168.10.52,MyLab.com
ESX4,192.168.10.53,MyLab.com

Instead of:

Hostname;IPaddress;Zone
ESX1;192.168.10.50;MyLab.com
ESX2;192.168.10.51;MyLab.com
ESX3;192.168.10.52;MyLab.com
ESX4;192.168.10.53;MyLab.com

Feb 022010
 

Due to security reasons WPAD and ISATAP have been by default blocked in Windows server 2008 DNS. There is a GlobalQueryBlockList which blocks these entries. When you try to create a WPAD entry to configure your ISA Auto Discovery, it will fail to resolve the WPAD entry whereas it will resolve the WSPAD entry. This can be quite problematic when you using the WPAD DNS entry rather then the DHCP possibility.

To remove the WPAD from the block list type the following command:
Dnscmd /config /globalqueryblocklistisatap

This command will override the existing list with ISATAP as the only keyword.
Now, you can resolve the WPAD entry from NSLOOKUP

Check DNS Server Global Query Block List from the Microsoft website for more details about DNS


Source