|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I have a *.csv file of DNS records I pulled from another system that I would like to import into my Server 2003 DNS database. Is there anyway to do this?
|
|
I actually did this fairly recently for some printers. The best way to do it is have a tab-delimited text file (like the one attached) and run the following commands from a batch file (if running interactively remove one % from each of the %%:
for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <FORWARD ZONE> %%1 A %%2
for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.advisors.hal
The numbers represent the column numbers (e.g. %%1 is column 1 and so on).
Please let us know if that helps you. I think you'll find DNSCMD very useful.
Joe Cormane Senior Network Engineer Hudson Advisors, LLC.
"Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message news:0A478940-CEF1-4C5C-B5F3-916680E660E8[ at ]microsoft.com...
[Quoted Text] >I have a *.csv file of DNS records I pulled from another system that I >would > like to import into my Server 2003 DNS database. Is there anyway to do > this?
begin 666 printers.txt M9&%L;&%S0TQ2,#$[ at ]>'AX+GAX>"YX>'[ at ]N,3 Q(#$P,0T*9&%L;&%S8VQR,#([ at ] M>'AX+GAX>"YX>'[ at ]N,3 R(#$P,[ at ]T*9&%L;&%S8VQR,#,[ at ]>'AX+GAX>"YX>'[ at ]N M,3 S(#$P,PT*9&%L;&%S8VQR,#0[ at ]>'AX+GAX>"YX>'[ at ]N,3 T(#$P- T*9&%L M;&%S8VQR,#4[ at ]>'AX+GAX>"YX>'[ at ]N,3 U(#$P-0T*9&%L;&%S8VQR,#8[ at ]>'AX M+GAX>"YX>'[ at ]N,3 V(#$P-[ at ]T*9&%L;&%S8VQR,#<[ at ]>'AX+GAX>"YX>'[ at ]N,3 W M(#$P-PT*9&%L;&%S8VQR,#[ at ][ at ]>'AX+GAX>"YX>'[ at ]N,3 X(#$P. T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[ at ]N M>'AX+GAX>"XS.2 S.0T*9&%L;&%S;'-R-# [ at ]>'AX+GAX>"YX>'[ at ]N-# [ at ]-# - M"F1A;&QA<VQS<C0Q('AX>"YX>'[ at ]N>'AX+C0Q(#0Q#0ID86QL87-L<W(T,B!X M>'[ at ]N>'AX+GAX>"XT,B T,[ at ]T*9&%L;&%S;'-R-#,[ at ]>'AX+GAX>"YX>'[ at ]N-#,[ at ] M-#,-"F1A;&QA<VQS<C0T('AX>"YX>'[ at ]N>'AX+C0T(#0T#0ID86QL87-L<W(T M-2!X>'[ at ]N>'AX+GAX>"XT-2 T-0T*9&%L;&%S;'-R-#8[ at ]>'AX+GAX>"YX>'[ at ]N M-#8[ at ]-#8-"F1A;&QA<VQS<C0W('AX>"YX>'[ at ]N>'AX+C0W(#0W#0ID86QL87-L M<W(T."!X>'[ at ]N>'AX+GAX>"XT." T. T*9&%L;&%S;'-R-#D[ at ]>'AX+GAX>"YX M>'[ at ]N-#D[ at ]-#D-"F1A;&QA<VQS<C4P('AX>"YX>'[ at ]N>'AX+C4P(#4P#0ID86QL M87-L<W(U,2!X>'[ at ]N>'AX+GAX>"XU,2 U,0T*9&%L;&%S;'-R-3([ at ]>'AX+GAX M>"YX>'[ at ]N-3([ at ]-3(-"F1A;&QA<VQS<C4S('AX>"YX>'[ at ]N>'AX+C4S(#4S#0ID M86QL87-L<W(U-"!X>'[ at ]N>'AX+GAX>"XU-" U- T*9&%L;&%S;'-R-34[ at ]>'AX 0+GAX>"YX>'[ at ]N-34[ at ]-34-"[ at ]`` ` end
|
|
Thanks for the info Joe. So do I need these two lines for every dns entry I want to import from my csv file?
"Joe Cormane" wrote:
[Quoted Text] > I actually did this fairly recently for some printers. The best way to do > it is have a tab-delimited text file (like the one attached) and run the > following commands from a batch file (if running interactively remove one % > from each of the %%: > > for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN CONTROLLER> > /RecordAdd <FORWARD ZONE> %%1 A %%2 > > for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN CONTROLLER> > /RecordAdd <REVERSE ZONE> %%3 PTR %%1.advisors.hal > > The numbers represent the column numbers (e.g. %%1 is column 1 and so on). > > Please let us know if that helps you. I think you'll find DNSCMD very > useful. > > Joe Cormane > Senior Network Engineer > Hudson Advisors, LLC. > > > "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message > news:0A478940-CEF1-4C5C-B5F3-916680E660E8[ at ]microsoft.com... > >I have a *.csv file of DNS records I pulled from another system that I > >would > > like to import into my Server 2003 DNS database. Is there anyway to do > > this? > > >
|
|
That should not be necessary. All you'd really need to do is either create a batch file for each of those commands to iterate through the contents of the file or combine the command to something like this:
for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <FORWARD ZONE> %%1 A %%2 [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.<DOMAIN>
then use those in a single batch file. As long as you have the csv formatted like the one i attached then saved as a tab delimited (or space delimited) text file you should be set. Test, of course, with a single entry first!
"Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message news:3AE1C939-CDA1-4D9B-A235-26A4893F0B11[ at ]microsoft.com...
[Quoted Text] > Thanks for the info Joe. So do I need these two lines for every dns entry > I > want to import from my csv file? > > "Joe Cormane" wrote: > >> I actually did this fairly recently for some printers. The best way to >> do >> it is have a tab-delimited text file (like the one attached) and run the >> following commands from a batch file (if running interactively remove one >> % >> from each of the %%: >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN >> CONTROLLER> >> /RecordAdd <FORWARD ZONE> %%1 A %%2 >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN >> CONTROLLER> >> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.advisors.hal >> >> The numbers represent the column numbers (e.g. %%1 is column 1 and so >> on). >> >> Please let us know if that helps you. I think you'll find DNSCMD very >> useful. >> >> Joe Cormane >> Senior Network Engineer >> Hudson Advisors, LLC. >> >> >> "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message >> news:0A478940-CEF1-4C5C-B5F3-916680E660E8[ at ]microsoft.com... >> >I have a *.csv file of DNS records I pulled from another system that I >> >would >> > like to import into my Server 2003 DNS database. Is there anyway to do >> > this? >> >> >>
|
|
Thanks again I appreciate your help. I don't see the attached file in the post.
"Joe Cormane" wrote:
[Quoted Text] > That should not be necessary. All you'd really need to do is either create > a batch file for each of those commands to iterate through the contents of > the file or combine the command to something like this: > > for /f "tokens=1,2,3" %%1 in (printers.txt) do > [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <FORWARD ZONE> %%1 A %%2 > [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.<DOMAIN> > > then use those in a single batch file. As long as you have the csv > formatted like the one i attached then saved as a tab delimited (or space > delimited) text file you should be set. Test, of course, with a single > entry first! > > "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message > news:3AE1C939-CDA1-4D9B-A235-26A4893F0B11[ at ]microsoft.com... > > Thanks for the info Joe. So do I need these two lines for every dns entry > > I > > want to import from my csv file? > > > > "Joe Cormane" wrote: > > > >> I actually did this fairly recently for some printers. The best way to > >> do > >> it is have a tab-delimited text file (like the one attached) and run the > >> following commands from a batch file (if running interactively remove one > >> % > >> from each of the %%: > >> > >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN > >> CONTROLLER> > >> /RecordAdd <FORWARD ZONE> %%1 A %%2 > >> > >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN > >> CONTROLLER> > >> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.advisors.hal > >> > >> The numbers represent the column numbers (e.g. %%1 is column 1 and so > >> on). > >> > >> Please let us know if that helps you. I think you'll find DNSCMD very > >> useful. > >> > >> Joe Cormane > >> Senior Network Engineer > >> Hudson Advisors, LLC. > >> > >> > >> "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message > >> news:0A478940-CEF1-4C5C-B5F3-916680E660E8[ at ]microsoft.com... > >> >I have a *.csv file of DNS records I pulled from another system that I > >> >would > >> > like to import into my Server 2003 DNS database. Is there anyway to do > >> > this? > >> > >> > >> > > >
|
|
No problem. It was in the earlier post. Either way, I created a text file that is formatted like this:
dallasCLR01 xxx.xxx.xxx.101 101 dallasclr02 xxx.xxx.xxx.102 102 dallasclr03 xxx.xxx.xxx.103 103 dallasclr04 xxx.xxx.xxx.104 104 dallasclr05 xxx.xxx.xxx.105 105 dallasclr06 xxx.xxx.xxx.106 106 dallasclr07 xxx.xxx.xxx.107 107 dallasclr08 xxx.xxx.xxx.108 108 dallasCLR10 xxx.xxx.xxx.110 110 dallasCLR11 xxx.xxx.xxx.111 111 dallasclr12 xxx.xxx.xxx.112 112 dallasCLR12 xxx.xxx.xxx.112 112 dallasclr9 xxx.xxx.xxx.109 109
Column 1 is the name, column 2 is the IP and column 3 is for the reverse DNS name. Each column is separated by a space.
"Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message news:FB6D9E5F-5583-4E80-95AC-0FA003A1CD91[ at ]microsoft.com...
[Quoted Text] > Thanks again I appreciate your help. I don't see the attached file in the > post. > > "Joe Cormane" wrote: > >> That should not be necessary. All you'd really need to do is either >> create >> a batch file for each of those commands to iterate through the contents >> of >> the file or combine the command to something like this: >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do >> [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <FORWARD ZONE> %%1 A %%2 >> [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <REVERSE ZONE> %%3 PTR >> %%1.<DOMAIN> >> >> then use those in a single batch file. As long as you have the csv >> formatted like the one i attached then saved as a tab delimited (or space >> delimited) text file you should be set. Test, of course, with a single >> entry first! >> >> "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message >> news:3AE1C939-CDA1-4D9B-A235-26A4893F0B11[ at ]microsoft.com... >> > Thanks for the info Joe. So do I need these two lines for every dns >> > entry >> > I >> > want to import from my csv file? >> > >> > "Joe Cormane" wrote: >> > >> >> I actually did this fairly recently for some printers. The best way >> >> to >> >> do >> >> it is have a tab-delimited text file (like the one attached) and run >> >> the >> >> following commands from a batch file (if running interactively remove >> >> one >> >> % >> >> from each of the %%: >> >> >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN >> >> CONTROLLER> >> >> /RecordAdd <FORWARD ZONE> %%1 A %%2 >> >> >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN >> >> CONTROLLER> >> >> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.advisors.hal >> >> >> >> The numbers represent the column numbers (e.g. %%1 is column 1 and so >> >> on). >> >> >> >> Please let us know if that helps you. I think you'll find DNSCMD very >> >> useful. >> >> >> >> Joe Cormane >> >> Senior Network Engineer >> >> Hudson Advisors, LLC. >> >> >> >> >> >> "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message >> >> news:0A478940-CEF1-4C5C-B5F3-916680E660E8[ at ]microsoft.com... >> >> >I have a *.csv file of DNS records I pulled from another system that >> >> >I >> >> >would >> >> > like to import into my Server 2003 DNS database. Is there anyway to >> >> > do >> >> > this? >> >> >> >> >> >> >> >> >>
|
|
Thank you very much.
"Joe Cormane" wrote:
[Quoted Text] > No problem. It was in the earlier post. Either way, I created a text file > that is formatted like this: > > dallasCLR01 xxx.xxx.xxx.101 101 > dallasclr02 xxx.xxx.xxx.102 102 > dallasclr03 xxx.xxx.xxx.103 103 > dallasclr04 xxx.xxx.xxx.104 104 > dallasclr05 xxx.xxx.xxx.105 105 > dallasclr06 xxx.xxx.xxx.106 106 > dallasclr07 xxx.xxx.xxx.107 107 > dallasclr08 xxx.xxx.xxx.108 108 > dallasCLR10 xxx.xxx.xxx.110 110 > dallasCLR11 xxx.xxx.xxx.111 111 > dallasclr12 xxx.xxx.xxx.112 112 > dallasCLR12 xxx.xxx.xxx.112 112 > dallasclr9 xxx.xxx.xxx.109 109 > > Column 1 is the name, column 2 is the IP and column 3 is for the reverse DNS > name. Each column is separated by a space. > > "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message > news:FB6D9E5F-5583-4E80-95AC-0FA003A1CD91[ at ]microsoft.com... > > Thanks again I appreciate your help. I don't see the attached file in the > > post. > > > > "Joe Cormane" wrote: > > > >> That should not be necessary. All you'd really need to do is either > >> create > >> a batch file for each of those commands to iterate through the contents > >> of > >> the file or combine the command to something like this: > >> > >> for /f "tokens=1,2,3" %%1 in (printers.txt) do > >> [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <FORWARD ZONE> %%1 A %%2 > >> [ at ]dnscmd <DOMAIN CONTROLLER> /RecordAdd <REVERSE ZONE> %%3 PTR > >> %%1.<DOMAIN> > >> > >> then use those in a single batch file. As long as you have the csv > >> formatted like the one i attached then saved as a tab delimited (or space > >> delimited) text file you should be set. Test, of course, with a single > >> entry first! > >> > >> "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message > >> news:3AE1C939-CDA1-4D9B-A235-26A4893F0B11[ at ]microsoft.com... > >> > Thanks for the info Joe. So do I need these two lines for every dns > >> > entry > >> > I > >> > want to import from my csv file? > >> > > >> > "Joe Cormane" wrote: > >> > > >> >> I actually did this fairly recently for some printers. The best way > >> >> to > >> >> do > >> >> it is have a tab-delimited text file (like the one attached) and run > >> >> the > >> >> following commands from a batch file (if running interactively remove > >> >> one > >> >> % > >> >> from each of the %%: > >> >> > >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN > >> >> CONTROLLER> > >> >> /RecordAdd <FORWARD ZONE> %%1 A %%2 > >> >> > >> >> for /f "tokens=1,2,3" %%1 in (printers.txt) do [ at ]dnscmd <DOMAIN > >> >> CONTROLLER> > >> >> /RecordAdd <REVERSE ZONE> %%3 PTR %%1.advisors.hal > >> >> > >> >> The numbers represent the column numbers (e.g. %%1 is column 1 and so > >> >> on). > >> >> > >> >> Please let us know if that helps you. I think you'll find DNSCMD very > >> >> useful. > >> >> > >> >> Joe Cormane > >> >> Senior Network Engineer > >> >> Hudson Advisors, LLC. > >> >> > >> >> > >> >> "Ghealdan" <Ghealdan[ at ]discussions.microsoft.com> wrote in message > >> >> news:0A478940-CEF1-4C5C-B5F3-916680E660E8[ at ]microsoft.com... > >> >> >I have a *.csv file of DNS records I pulled from another system that > >> >> >I > >> >> >would > >> >> > like to import into my Server 2003 DNS database. Is there anyway to > >> >> > do > >> >> > this? > >> >> > >> >> > >> >> > >> > >> > >> > > >
|
|
|