It appears you have not yet registered with our community. To register please click here...

DNforum.com - Domain Sales, Domain Forum, Domain Appraisals
 
Register Now!
Register Now for FREE!
Our records show you have not yet registered to our forums. To sign up for your FREE account INSTANTLY fill out the form below!

Username: Password: Confirm Password: E-Mail: Confirm E-Mail:  
Birthday:       I agree to forum rules 

Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Scripts
Reply
 
LinkBack Thread Tools Display Modes
Old 11-16-2005, 09:41 AM   #1 (permalink)
Administrator
 
DotComGod's Avatar
 
Name: Adam Dicker
Last Online: 09-05-2008 01:44 PM
iTrader: (35)
Join Date: Feb 2003
Posts: 8,516
DNF$: 4,653,066
Location: Toronto, Canada
Country:


Anyone using Microsoft DNS on WIN 2003 Server?

I am wondering if anyone has come across tools to make it easier to input lists of domains into Microsoft DNS in Windows 2003 server.

1 by 1 is way to time consumimg.

Please let me know.

-=DCG=-
DotComGod is offline   Reply With Quote
Sponsored Links
Old 11-16-2005, 10:59 AM   #2 (permalink)
**********
 
Last Online: Today 08:11 PM
iTrader: (87)
Join Date: Apr 2003
Posts: 1,615
DNF$: 7,076
Location: .us


Re: Anyone using Microsoft DNS on WIN 2003 Server?

http://www.microsoft.com/technet/pro...38bf170b6.mspx

http://www.microsoft.com/technet/pro...5a804a79f.mspx
__________________
Revenue.net | Parked.com
NameGuy is online now   Reply With Quote
Old 11-16-2005, 11:02 AM   #3 (permalink)
Administrator
 
DotComGod's Avatar
 
Name: Adam Dicker
Last Online: 09-05-2008 01:44 PM
iTrader: (35)
Join Date: Feb 2003
Posts: 8,516
DNF$: 4,653,066
Location: Toronto, Canada
Country:


Re: Anyone using Microsoft DNS on WIN 2003 Server?

I can set it up easily, the issue is they all have to be entered 1 at a time and I have thousands to enter, must be a script somwhere to do it.

-=DCG=-
DotComGod is offline   Reply With Quote
Old 11-16-2005, 11:24 AM   #4 (permalink)
**********
 
Last Online: Today 08:11 PM
iTrader: (87)
Join Date: Apr 2003
Posts: 1,615
DNF$: 7,076
Location: .us


Re: Anyone using Microsoft DNS on WIN 2003 Server?

That is what this is about. There's a utility called dnscmd.exe that you can use with a batch file to setup domains programmatically. Details on doing it is at those links.

example:

dnscmd PRIMARY /zoneadd contoso.COM /primary /file contoso.COM.dns
//sets up the overall zone contoso.COM on the primary name server

dnscmd SECONDARY /zoneadd contoso.COM /secondary /file contoso.COM.dns
//sets up the zone on the secondary

dnscmd PRIMARY /recordadd contoso.COM @ A 1.1.1.1
//sets up the record on the primary server for contoso.COM pointing to the IP 10.1.1.1

dnscmd PRIMARY /recordadd contoso.COM www CNAME contoso.COM
//sets up a CNAME record for WWW.contoso.com to point to the same IP as
// contoso.COM

batch file for adding a new site:

Code:
@SET PRIMARYNS=dns.contoso.com
@SET SECONDARYNS=dns1.contoso.com
@SET IP=1.1.1.1
@SET LOC=c:\web
@SET FTPSITE=ftp_computername
@SET ANONACCT=IUSR_computername
@SET IIS_ASPNET_ACCT=networkservice

@if "%1" == "?" goto usage
@if "%1" == "/?" goto usage

@if "%1" == "" goto errormissingvariable
@if "%2" == "" goto errormissingvariable
@if "%3" == "" goto errormissingvariable
@if "%4" == "" goto errormissingvariable

@set path=%path%;%SYSTEMDRIVE%\inetpub\adminscripts;%SystemDrive%\Program Files\Common Files\Microsoft Shared\Web Server Extensions\50\bin

:dns
dnscmd %PRIMARYNS% /zoneadd %2%3 /primary /file %2%3.dns
dnscmd %SECONDARYNS% /zoneadd %2%3 /secondary /file %2%3.dns
dnscmd %PRIMARYNS% /recordadd %2%3 @ NS %SECONDARYNS%
dnscmd %PRIMARYNS% /recordadd %2%3 @ A %IP%
dnscmd %PRIMARYNS% /recordadd %2%3 www CNAME %2%3 

:dir
mkdir %LOC%\%1 
mkdir %LOC%\%1\%2
copy temp.htm %LOC%\%1\%2\temp.htm

:web
iisweb /create %LOC%\%1\%2 "%2%3" /d www.%2%3 

cscript //nologo translate.js "%2%3" > siteid.txt
for /f %%I in (siteid.txt) do SET SITEID=%%I
Adsutil set w3svc/%SITEID%/serverbindings ":80:WWW.%2%3" ":80:%2%3"
Del siteid.txt

:iffp
if "%4"=="y" goto fpse
goto skipfp

:fpse
owsadm -o install -p 80 –m www.%2%3 -t msiis -u %1

:skipfp

:ftp
Iisftpdr /create "%FTPSITE%" %1 %LOC%\%1

cscript //nologo translateftp.js "%FTPSITE%" > ftpsiteid.txt
for /f %%I in (ftpsiteid.txt) do SET FTPSITEID=%%I
adsutil.vbs set msftpsvc/%FTPSITEID%/root/%1/accesswrite "true"
del ftpsiteid.txt

:acls
cacls %LOC%\%1 /t /e /g %1:c %IIS_ASPNET_ACCT %:r <y.txt
@goto end

:errormissingvariable
@echo You are missing a variable.
@goto usage

:usage
@echo Creates a domain on the LOCAL server.
@echo var1=username, var2=domain (without extension!), var3=extension, var4=y (for FrontPage 2002 Server Extensions, n  for none.)
@echo EXAMPLE myusername mydomain .com y 
@goto end

:end
__________________
Revenue.net | Parked.com

Last edited by NameGuy; 11-16-2005 at 11:31 AM. Reason: Automerged Doublepost
NameGuy is online now   Reply With Quote
Old 11-16-2005, 12:00 PM   #5 (permalink)
Administrator
 
DotComGod's Avatar
 
Name: Adam Dicker
Last Online: 09-05-2008 01:44 PM
iTrader: (35)
Join Date: Feb 2003
Posts: 8,516
DNF$: 4,653,066
Location: Toronto, Canada
Country:


Re: Anyone using Microsoft DNS on WIN 2003 Server?

Thanks!

-=DCG=-
DotComGod is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 08:43 PM.
Copyright @2001-2008 DNForum.com

Learn Domains
Promote Domains
Research Domains
Buy Domains
Resell Domains
Park Domains
Sell Domains
Build Domains
Host Domains
Trademark Domains
Domain Domains
manage Domains
Appraise Domains