Is there a way to set some default MX records that are added to any new forward zone that is created within the DNS manager in Windows 2008 Standard?

If not is there a command line I can run to add the MX records to a specific, existing forward zone?

That way I could just create a zone, create my A and CNAME records manually, then run a script to set MX records.

link|improve this question

50% accept rate
feedback

1 Answer

You can't set default MX records, but you can script them.

You can use Powershell to add a DNS record. Here's a sample for MX:

$mxRec = [WMIClass]“\\$ServerName\root\MicrosoftDNS:MicrosoftDNS_MXType”
$Server = “NyDNSServer”
$Owner = “mydomain.com”
$Container = “mydomain.com”
$RecordClass = $Null
$TTL = $Null
$Preference = 10
$MailServer = “mail.mydomain.com”
$$MXrec.CreateInstanceFromPropertyData($ServerName, $ContainerName,’
$OwnerName, $RecordClass, $TTL, $Preference, $MailServer
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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